Re: undefined index
| From: | Phil Driscoll | Date: | Tue, 01 May 2001 18:37:43 +0000 |
| Subject: | Re: undefined index | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-9025@lists.php.net to get a copy of this message | ||
Your best bet is to do some isset() calls:
eg
if(isset($row['imageurl']))
{
$image=$row['imageurl'];
}
else
{
/*maybe report the problems or handle it like this...*/
$image=$default_image_url;
/*where you have already set up $default_image_url to point somewhere
sensible*/
}
Cheers
--
Phil Driscoll
Dial Solutions
+44 (0)113 294 5112
http://www.dialsolutions.com
http://www.dtonline.org