Multiple Arrays
| From: | Kris Howl | Date: | Tue, 01 Aug 2000 16:13:31 +0000 |
| Subject: | Multiple Arrays | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-9471@lists.php.net to get a copy of this message | ||
Hi,
I'm rather new to php, just getting my head around arrays at the moment.
When I use this code, I get a Parse error.
This is the code:
$marray = array(
"marray" =>
("a"=>"orange","e"=>"apple","d"=>"pear"),
"taste" =>
("z"=>"bitter","x"=>"nice","y"=>"yuck"),
"color" =>
("j"=>"orange","k"=>"red","l"=>"yellow"),
"size" => (1,2,3,4)
);
I used an example from the manual, but changed it slightly in hopes to teach
myself something. I can't see anything wrong .. I was hoping someone could
help me. Also, how do I call these up in an echo? For example, if I wanted
it to appear as "Orange Nice" (without the quotes). How would I do that?
All help is much appreciated.