FW: [thelist] Random Page Titles is it possible with php/MySQL

Andre Genic g3nic at lycos.co.uk
Thu Sep 18 06:40:23 CDT 2003


Jay thanks man, guess I haven't had enough coffee yet this morning ;) didn't
realize I'd missed something as obvious as that.

Andre...

-----Original Message-----
From: Jay Blanchard [mailto:jay.blanchard at niicommunications.com]
Sent: 18 September 2003 12:33
To: g3nic at lycos.co.uk; thelist at lists.evolt.org
Subject: RE: [thelist] Random Page Titles is it possible with php/MySQL


[snip]
while (($myrow = mysql_fetch_array($result)))
{
echo "<title>$page_title"</title>;
}

Any pointers as to where I'm going wrong?
[/snip]

Yep. You ask for an array in your while statement, but your echo
statement does not reference the array;

echo"<title>".$myrow['page_title']."</title>";

Now, if your array doesn't come back with that reference you can see
what it returns by doing this;

while (($myrow = mysql_fetch_array($result)))
{
print_r($myrow); // outputs your array in key value pairs
}



More information about the thelist mailing list