[nycphp-talk] ${$variable}

Michael Southwell southwell at
Wed Aug 27 14:46:25 EDT 2003

A line of code says this:
   if (!(${$foo})) do something if the value is empty

If $foo="bar" and $bar="something" then will ${$foo} evaluate to 
"something"--which I assume is the purpose of the curly brackets?  But it 
doesn't seem to work when the value is empty, though I would swear it used 
to.  or maybe there is something with an empty value evaluating true 
anyway, so I need to use =="" or ==="", or =='' or ==='' (single quotation 
marks)?  Is this tricky, or am I just ignorant?

Michael G. Southwell =================================
DNEBA Enterprises
81 South Road
Bloomingdale, NJ 07403-1419
973/492-7873 (voice and fax)
southwell at

More information about the talk mailing list