[nycphp-talk] empty string as array key ?

David Mintz dmintz at
Fri Aug 8 07:33:08 EDT 2003

I just found out that this is legal

$minutes = array(''=>" ","00"=>"00","30"=>"30"); //etc

Is this  -- the fact that you can get away with using an
empty string as an array key -- a bug or a feature (or neither)?

I wonder if I can count on this behavior in other PHP versions (mine is
4.3.2 on RH) In this instance it's quite helpful in solving my problem
with sticky dropdowns and the Smarty html_options function ... a problem
too boring and complicated to explain unless someone's interested.


David Mintz
Email: See first!

More information about the talk mailing list