Posted by peter on 09/02/07 15:52
> As you can see, I am defining the string as none.jpg. I can't
> imagine why it still thinks it is null.
As Jerry has pointed out. NULL and an empty string are 2 complete different
things. If the code I supplied is not working then the function is not
returning NULL it is returning an empty string.
That being the case change the is_null function to the empty function
<?PHP
$image = getRandomImage('LL/');
if (empty($image))
{
$image = '';// Set to the image you wish
}
echo "<img src='$image' height=90 width=120 alt='LL'>";
?>
[Back to original message]
|