while loop data doesnt print on screen - PHP
<p>Does anyone see an error in this? I dont get the results printed which is expected from the second loop. How ever the second loop headers are printed without an issue.</p>

<p>I'm trying to print data from a SQL database.</p>

<pre><code>  &lt;?php

$con= new mysqli('localhost','root','','regional_data');
if (mysqli_connect_errno()) {exit('Connection failed: '. mysqli_connect_error());}
$result = mysqli_query($con,"SELECT * FROM newchk WHERE dist_chk='$distUsr'");

echo "&lt;table cellpadding='2' class='tablet' cellspacing='0'&gt;";
echo
"&lt;tr&gt;
&lt;th&gt;&lt;/th&gt;"
."&lt;th&gt;"."Starting Cheque No"."&lt;/th&gt;"
."&lt;th&gt;"."Ending Cheque No"."&lt;/th&gt;"
."&lt;th&gt;"."Total No of Cheques remaining"."&lt;/th&gt;"
."&lt;th&gt;"."Cheque Type"."&lt;/th&gt;"
."&lt;/tr&gt;";

while ($reca = mysqli_fetch_array($result))
{
echo "&lt;tr&gt;";
echo "&lt;td&gt;&lt;input type='checkbox' &gt;&lt;/td&gt;";
echo "&lt;td&gt;".trim($reca["sbstart"])."&lt;/td&gt;";
echo "&lt;td&gt;".trim($reca["sbend"])."&lt;/td&gt;";
echo "&lt;td&gt;".trim($reca["totsb"])."&lt;/td&gt;";
echo "&lt;td&gt;SB&lt;/td&gt;";
echo "&lt;/tr&gt;";
}
echo "&lt;/table&gt;";

        echo "&lt;table cellpadding='2' class='tablet' cellspacing='0'&gt;";
        echo
        "&lt;tr&gt;
        &lt;th&gt;&lt;/th&gt;"
        ."&lt;th&gt;"."Starting Cheque No"."&lt;/th&gt;"
        ."&lt;th&gt;"."Ending Cheque No"."&lt;/th&gt;"
        ."&lt;th&gt;"."Total No of Cheques remaining"."&lt;/th&gt;"
        ."&lt;th&gt;"."Cheque Type"."&lt;/th&gt;"
        ."&lt;/tr&gt;";
        while ($reca = mysqli_fetch_array($result))
        {
        echo "&lt;tr&gt;";
        echo "&lt;td&gt;&lt;input type='checkbox' &gt;&lt;/td&gt;";
        echo "&lt;td&gt;".trim($reca["gwstart"])."&lt;/td&gt;";
        echo "&lt;td&gt;".trim($reca["gwend"])."&lt;/td&gt;";
        echo "&lt;td&gt;".trim($reca["totgw"])."&lt;/td&gt;";
        echo "&lt;td&gt;GW&lt;/td&gt;";
        echo "&lt;/tr&gt;";
        }
        echo "&lt;/table&gt;";


$con-&gt;close(); 
?&gt;
&lt;/div&gt;
</code></pre>
