Re: Checking for Null Variables
| From: | Florin Dumitrescu | Date: | Fri, 07 Mar 2003 17:32:02 +0000 |
| Subject: | Re: Checking for Null Variables | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-138665@lists.php.net to get a copy of this message | ||
Check out http://php.net/empty
HTH,
Florin.
On Fri, 7 Mar 2003 12:24:29 -0500
"Christopher J. Crane" <ccrane@ikon.com> wrote:
> How do I check if a variable is blank or not. I am returning data from
> a MySQL database and if a field is empty I would like to do something
> different.
>
> I tried
> if($field["Name"] == "") { do this }
> else { do this }
>
> It does not work right. Actually, at one point, it was working in the
> exact opposite manner.
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
Florin Dumitrescu
Webmaster
Departamentul Internet
Astral Telecom SA, Sucursala Brasov