Basic php problem, not parsing this code.
From: Jones (none_at_spamnone.com)
Date: 05/25/04
- Next message: Doug Hutcheson: "Re: Basic php problem, not parsing this code."
- Previous message: chris asmussen: "Re: Parse error: parse error, unexpected T_STRING"
- Next in thread: Doug Hutcheson: "Re: Basic php problem, not parsing this code."
- Reply: Doug Hutcheson: "Re: Basic php problem, not parsing this code."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 25 May 2004 04:54:22 +0100
For some reason neither my home PC running php 4.3.3 or my rented server
running php 4.3.6 will parse this script.
This is an exercise out of a book that I was recommended on this NG, called
PHP and MySQL Web Development, Second Edition. Everything was going so well
up until now and I have been able to correct all of the errors in the code
myself (where I hadn't typed correctly or where I had been experimenting).
And now I'm stumped.
This has got to be something so simple, but I can't see what it is. The
code isn't being parsed, just returned as a mess in the browser. I had no
problems with it displaying php until now, all of my old files are still
working.
<body>
<table border="0" cellpadding="3">
<tr>
<td bgcolor="#CCCC0C" align="center">Distance</td>
<td bgcolor="#CCCC0C" 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>
</body>
</html>
I am so sick of Bob's Auto Parts lol.
Any ideas would be much appreciated.
Cheers
- Next message: Doug Hutcheson: "Re: Basic php problem, not parsing this code."
- Previous message: chris asmussen: "Re: Parse error: parse error, unexpected T_STRING"
- Next in thread: Doug Hutcheson: "Re: Basic php problem, not parsing this code."
- Reply: Doug Hutcheson: "Re: Basic php problem, not parsing this code."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|