Array declaration feature request?

From: Date: Sat, 18 Mar 2000 00:08:59 +0000
Subject: Array declaration feature request?
Groups: php.version4 
Request: Send a blank email to php-version4+get-12350@lists.php.net to get a copy of this message
Howdy folks, I have a quick question about a possible feature request for declaring associative arrays. I have several cases where I create associative arrays for doing information storage and lookup. I want to look for a key to find a value, and have a value and want to find the key. So for example, $test = array(1=>"ERROR_NOMONEY", 2=>"ERROR_NOLOGIN", "ERROR_NOMONEY"=>1, "ERROR_NOLOGIN"=>2); This is nice for doing a forware and reverse lookup if you will. So, my feature request is to add the <=> key, so I only have to declare my array as $test = array(1<=>"ERROR_NOMONEY", 2<=>"ERROR_NOLOGIN"); I know that we are trying to get php4 "out the door" so to speak, so I understand not wanting to put more features in to the language. I'm not married to it, its just an idea I thought I'd throw out there for discussion. Thanks Walt

« previous php.version4 (#12350) next »