RE: [PHP] Easy Question -- Show/ Hide text based on output of query
| From: | Edward R. Bailey | Date: | Tue, 05 Feb 2002 18:53:10 +0000 |
| Subject: | RE: [PHP] Easy Question -- Show/ Hide text based on output of query | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-83618@lists.php.net to get a copy of this message | ||
Sorry -- Here it is
<?php If ($memberNotes) {
$notes = "<div align=left><font
size=-1><b>Notes:</b></font></div>";
} else {
$notes = "";
}
?>
Then I call $notes using --
echo ($notes)
> -----Original Message-----
> From: Jason Wong [mailto:php-general@gremlins.com.hk]
> Sent: Tuesday, February 05, 2002 1:39 PM
> To: php-general@lists.php.net
> Subject: Re: [PHP] Easy Question -- Show/ Hide text based on
> output of query
>
>
> On Wednesday 06 February 2002 02:38, Edward R. Bailey wrote:
> > I used echo($notes) at the bottom of the page and the
> output of $notes
> > prints reardless of whether or not the db field
> $memberNotes contains
> > any data. It seems to me that $notes is always acting as if
> > $memberNotes always contains data. Is their some way to
> invoke $notes
> > only if $memberNotes returns any data?
>
>
> Please post your full code.
>
>
> --
> Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
>
> /*
> "I go on working for the same reason a hen goes on laying eggs."
> - H. L. Mencken
> */
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>