| 
 Posted by Sandman on 07/25/06 09:31 
In article <Pnexg.61535$gN5.51649@fe10.usenetserver.com>, 
 "David T. Ashley" <dta@e3ft.com> wrote: 
 
> Hi, 
>  
> Aside from the obvious recursive syntax for initialization, 
>  
> $x = array( ... array( ...)), 
>  
> what is the best way to deal with multi-dimensional arrays in PHP? 
>  
> It seems there is no syntax like $x[i][j][k]??? 
 
Of course there is. 
 
 
<? 
    $monkey["foo"]["bar"]["oof"]["rab"] = "foobar"; 
    print_r($monkey); 
?> 
 
Output: 
Array 
( 
    [foo] => Array 
        ( 
            [bar] => Array 
                ( 
                    [oof] => Array 
                        ( 
                            [rab] => foobar 
                        ) 
 
                ) 
 
        ) 
 
) 
 
 
 
--  
Sandman[.net]
 
[Back to original message] 
 |