|
Posted by Fred Atkinson on 09/03/07 01:15
On Sun, 2 Sep 2007 16:52:26 +0100, "peter" <submit@flexiwebhost.com>
wrote:
>
>> 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'>";
>?>
>
Gentlemen:
I thank you.
Your revision above didn't quite fit my application due to a
quirk in the program being called up (that I didn't show you). But
after I revised it a slight little bit, it did the job just perfectly.
Thank you both for your help. I got it working just fine.
My best regards, :-)
Fred Atkinson
Navigation:
[Reply to this message]
|