jcbodyworks
asked on
PHP incorrect output with loop
I am trying to construct the correct syntax for a php code, here it is, keeps displaying incorrectly. Any light on this? Thanks!
while ($row=mysql_fetch_array($u pcoming))
{
$appid[$n]=$row['ID'];
$appdatetime[$n]=$row['app tdatetime' ];
$schedulet[$l]=date('g:i A' , strtotime($appdatetime[$n] ));
$schedulea[$l]=date("m/d/Y ",strtotim e($appdate time[$n])) ;
$display .= $schedulea[$l] . "@" . $schedulet[$l] ;
$display .= ". To cancel, click <a href='cancellations.php?qu ickcancel= yes&id=" . $appid[$n] . '" here</a><br>\n";
$display .= '</font><font size="2" face="Eras Demi ITC">\n';
if ($row['ID']=="")
{
$display .= '<font size="2" face="Eras Demi ITC">No Future Appointments Scheduled';
}
$n++;
$l++;
}
echo "$display";
while ($row=mysql_fetch_array($u
{
$appid[$n]=$row['ID'];
$appdatetime[$n]=$row['app
$schedulet[$l]=date('g:i A' , strtotime($appdatetime[$n]
$schedulea[$l]=date("m/d/Y
$display .= $schedulea[$l] . "@" . $schedulet[$l] ;
$display .= ". To cancel, click <a href='cancellations.php?qu
$display .= '</font><font size="2" face="Eras Demi ITC">\n';
if ($row['ID']=="")
{
$display .= '<font size="2" face="Eras Demi ITC">No Future Appointments Scheduled';
}
$n++;
$l++;
}
echo "$display";
What is it displaying that is incorrect?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.