- To: Jeff Waugh <jdub@xxxxxxxxxxx>, "'slug@xxxxxxxxxxx'" <slug@xxxxxxxxxxx>
- Subject: Re: [SLUG] PHP question..
- From: Andrew Bennetts <andrew@xxxxxxxxxxxx>
- Date: Sun May 27 12:25:02 2001
- User-agent: Mutt/1.3.18i
On Sun, May 27, 2001 at 11:12:55AM +1000, Jeff Waugh wrote:
> <quote who="Chris Barnes">
> > // Display the text of each joke in a paragraph
> > while ( $row = mysql_fetch_array($result) ) {
> > echo("<P>" . $row["JokeText"] . "</P>");
> > }
> >
> > I would really like the site to display the ID field with the date next to
> > it, then on a new line the JokeText, then on a new line the JokeAuthor. I've
> > been playing around with it but i keep getting PHP Parse errors...
>
> while ($row = mysql_fetch_array($result)) {
> echo "<p>" . $row[ID] . " - " . $row[JokeDate] . "<br>\n"
> . $row[JokeText] . "<br>\n"
> . $row[JokeAuthor] . "</p>\n";
> }
I'm not a PHP person, but shouldn't that be $row["ID"], etc... (i.e.
with quotes)?
Or is PHP really that nasty?
-Andrew.