[thelist] PHP - While Loop
Kath
Kath at cyber-kat.com
Thu Aug 14 12:03:24 CDT 2003
At 09:11 AM 8/14/2003 -0700, you wrote:
>kath...
>
>give us the "entire" test file that you have...
>
I was trying to keep the post as short as possible <g> - thought I had
included enough.
Here is everything between the BODY tags
<table border="0" cellpadding="3">
<tr>
<td bgcolor="#CCCCCC" align="center">Distance</td>
<td bgcolor="#CCCCCC" align="center">Cost</td>
</tr>
<?
$distance = 50;
while ($distance <= 250 )
{
echo "<tr>\n <td align='right'>$distance</td>\n";
echo " <td align='right'>". $distance / 10 ."</td>\n</tr>\n";
$distance += 50;
}
?>
</table>
Anthony Baratta asked ...
>
>Is your testing environment working at all?? Can you run a php page with
>just <?phpinfo()?>
>
>Based upon the output, I'd make sure you have opening and closing <??> tags
>paired correctly.
>
Yes, it works fine with all the other pages I have done so far. I tired it
with both <??> and with <?PHP ?> Neither worked.
Thanks again to all trying to help this PHP newbie.
Kath ... "A patriot must always be ready to defend his country against its
government." -Edward Abbey, naturalist and author (1927-1989)
Established 1995 --> www.cyber-kat.com
More information about the thelist
mailing list