Re: A question - ($file_exists)

From: Date: Thu, 01 Jan 1970 00:00:00 +0000
Subject: Re: A question - ($file_exists)
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-7900@lists.php.net to get a copy of this message
Hi there: What about doing it like this: <?php $num = mysql_num_rows($result); while($row = mysql_fetch_array($result)) { $image = $row['image']; } //Loop through all images in DB: for($count = 0; $count < count($image); $count++) { $display_this = $display_this . $image; } //end for-loop } //end-while loop if($num != 0) { //Images exist so display them: echo $display_this; } else { //Images don't exist so display blank inage: echo "path/to/blank.gif;" } ?> #-------------------------------------------------------# "Believe nothing - consider everything" Russ Michell Anglia Polytechnic University Webteam http://gertrude.sipu.anglia.ac.uk/webteam r.j.michell@anglia.ac.uk +44 (0)1223 363271 ext 2331 www.theruss.com #-------------------------------------------------------#

« previous php.db (#7900) next »