Sir I have these codes
global $mybalance;
$mybalance=0;
$mydrcr='';
$result2 = sqlsrv_query($con,$query) or die ("Error". sqlsrv_errors($con)) ;
$sno=0;
while($res2 = sqlsrv_fetch_array($result2)) {
echo "<tr>";
$mybalance=($res2['balance']);
echo'Opening Balance='.number_format($mybalance).'<br>';
if($mybalance=0){
$mydrcr='';
}
if($mybalance>0){
$mydrcr='dr';
}
if($mybalance<0){
$mydrcr='cr';
}
echo'Opening Balance='.number_format($mybalance);
The codes
PHP Code:
echo'Opening Balance='.number_format($mybalance);
work fine at line 11 but does not work at line 24
Please help