intval(0) == ????

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
I can't figure out what does return intaval(0).

I've this code in a function:

$theValue = ($theValue != "" ? intval($theValue) : NULL);

when I do test this
if $theValue = = NULL then
fails if the value passed is '0' (an edit type on a form).

what's wrong


Re: intval(0) == ????

Bob Bedford wrote:
Quoted text here. Click to load it

Use type comparison:

$theValue === NULL


Re: intval(0) == ????

On Wed, 02 Feb 2005 16:42:35 +0100, Erwin Moller

Quoted text here. Click to load it

 Yes it is.

< Space: disk usage analysis tool

Site Timeline