Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2

Thread: 3D Array?

  1. #1
    New Coder
    Join Date
    Sep 2012
    Posts
    47
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question 3D Array?

    Why does this not work?

    PHP Code:
    myArray['numbers'] = array(=> "One"=> "Two");
    myArray['letters'] = array("A" => "Aye""B" => "Bee"); 

    ???????

    Any way to achieve something like that?

  • #2
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,978
    Thanks
    4
    Thanked 2,659 Times in 2,628 Posts
    Sure, make myArray a variable. Right now its a constant. It'll work fine after that.
    It is only a 2 dimensional array though, not a three.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •