Date: 08/30/01
- Next message: Andrey Hristov: "Re: [PHP] Associative arrays (names and strings)"
- Previous message: Nic Skitt: "Re: [PHP] Headers already sent...."
- Next in thread: Andrey Hristov: "Re: [PHP] Associative arrays (names and strings)"
- Reply: Andrey Hristov: "Re: [PHP] Associative arrays (names and strings)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Anyway to do this fast:
$arr = array("set1" => array(1, 2, 3, 4), "set2" => array(11, 22, 33, 44),
"set3" => array(111, 222, 333, 444));
It's not that I want to access $arr like: echo $arr['set1']
I also want to access it as: echo $arr[1] (and it must be equal to
$arr['set1'];
and It seems i can't do this:
$arr = array("set1", 1 => array(1, 2, 3, 4), "set2", 2 => array(11, 22, 33,
44), "set3", 3 => array(111, 222, 333, 444));
any suggestion to get an array associated by both number and string keys?
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe <email protected> For additional commands, e-mail: php-general-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Andrey Hristov: "Re: [PHP] Associative arrays (names and strings)"
- Previous message: Nic Skitt: "Re: [PHP] Headers already sent...."
- Next in thread: Andrey Hristov: "Re: [PHP] Associative arrays (names and strings)"
- Reply: Andrey Hristov: "Re: [PHP] Associative arrays (names and strings)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

