how do i display the output from for loop as a table in php : my output is in the form of a 2d array. i have uploaded a sample file and the output is displayed like a paragraph. i want it to be displayed as a table.


code:

<!-- begin snippet: js hide: false console: true babel: false -->

<!-- language: lang-html -->

    <?php
    require("reader.php"); // php excel reader
    $file="sample.xls";
    $connection=new Spreadsheet_Excel_Reader(); // our main object
    $connection->read($file);
    $startrow=1;
    $endrow=1000;



    for($i=$startrow;$i<$endrow;$i++){ // we read row to row

    for($j=1;$j<=30;$j++)
    {
    	
    echo $connection->sheets[0]["cells"][$i][$j]; // so we get [2][3] and [3][3]

    echo "\n";


    }

    echo "\n";




    }


   

    ?>

<!-- end snippet -->

