Re: An if-statement in a "while(list("

From: Date: Sun, 21 Mar 2004 19:41:28 +0000
Subject: Re: An if-statement in a "while(list("
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-33588@lists.php.net to get a copy of this message
Henning Olsen wrote:
I have a search on my page, which presents all the adresses one after all. I would like to present a graphic icon representing the mailaddress, but only when ther IS a mailaddress. Not everyone has a mail address. But I cant put an if-statement in the "while(list(..." Any suggestione to me on showing a graphic with a link when $mail is different from null? Build the inside of your loop like this...
print("<p><a href='kontakt/kontakt_edit.php?id=$id'>$navn</a><br> <small>"); if ( $mail!='' ) then
       [print the icon here]
else
       echo "<A HREF='mailto:$mail'>$mail</a>";
Bruno Ferreira --- [This E-mail scanned for viruses by Declude Virus]

« previous php.db (#33588) next »