Re: 3 dimensional array

From: Date: Mon, 31 Jul 2000 18:02:42 +0000
Subject: Re: 3 dimensional array
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-9214@lists.php.net to get a copy of this message
Simple: $darray = array("x" => array("y" => array("z" => 1))); Then '$darray["x"]["y"]["z"]' has a value of 1. Of course you can construct it more intuitively using: $darray["x"]["y"]["z"] = 1; Ciao, Andreas Lars Wilhelmsen wrote: > > Hi. > > I'm currently coding a small utility function, and in it i want a 3 > dimentional associative array. > Is it possible at all? > > For a 2-dim array the syntax is trivial: Array( "foo" => "bar", > "fuzzy" => > "bear" ); > > What is the syntax for a 3dim array? I looked in the documentation, but it > said nothing about > 3-dims. > > Regards, > -larsw- > > -- > Lars Wilhelmsen <lw@ez.no>, developer @ eZ systems <www.ez.no> > Checkout: The ultimate PHP checklist: > http://zez.org/lw/phpchecklist.php3 > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#9214) next »