quick way:
if (!$field["name"]){
} else {}
elegant ways (there will be many):
if (empty($field["name"])){ // null or 0
} else {}
if (is_null($field["name"])){ // null
} else {}
is_scalar() // string
is_integer() // integer
is_float() // float
etc etc etc
Christopher J. Crane wrote:
How do I
Check out http://php.net/empty
HTH,
Florin.
On Fri, 7 Mar 2003 12:24:29 -0500
"Christopher J. Crane" <[EMAIL PROTECTED]> 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 tr
2 matches
Mail list logo