NYCPHP Meetup

NYPHP.org

[nycphp-talk] ${$variable}

Analysis & Solutions danielc at analysisandsolutions.com
Wed Aug 27 15:29:41 EDT 2003


Hey Chris:

On Wed, Aug 27, 2003 at 12:20:12PM -0700, Chris Shiflett wrote:

> I'd like to make a small note regarding this topic. I think it's much
> more
> readable (and correct) to use the empty() function, especially if that 
> is what
> you are wanting to check.

Yeah.  I was thinking of throwing that in in the mix of my explanation, 
but decided not to, since it might cloud the matter.

But, of course, folks must keep in mind that empty() returns true under 
all of the following circumstances:
    $bar = '';
    $bar = null;
    $bar = 0;
    $bar = false;
    or if $bar is not set at all

--Dan

-- 
     FREE scripts that make web and database programming easier
           http://www.analysisandsolutions.com/software/
 T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
 4015 7th Ave #4AJ, Brooklyn NY    v: 718-854-0335   f: 718-854-0409



More information about the talk mailing list