RE: EZ array problem - What's wrong with my brain?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, December 1, 2006 9:28 am, Ray Hauge wrote:
> I forgot to mention that you won't be able to use "0", "1", etc. as
> PHP
> will convert those to integers.  If you do use them, then they will
> replace [0] with whatever you put in there, and if you are using the
> references, it will replace both instances with your new ["0"]

You can type-cast to (string) to force a string key.

$foo[(string) '1'] = 'foo';

should, I think, have a string key...

At least I know for sure that it works for float keys...

You'll have to try it and see for '1' -- I could be way off base.

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some starving artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux