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 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Sep 2007
    Posts
    7
    Thanks
    2
    Thanked 0 Times in 0 Posts

    printing from a multidimentional array

    Hi,

    I have a multidimentional array like below.

    How do I just print out the second array from the three in the main array?

    Code:
    array(3) {
      [0]=>
      array(8) {
        [0]=>
        string(5) "1bart"
        [1]=>
        string(20) "kyle19@example.com"
        [2]=>
        string(9) "127.0.0.1"
        [3]=>
        string(39) "Wednesday 5th September 2007 @ 18:15-15"
        [4]=>
        string(10) "a557e22c2d"
        [5]=>
        string(7) "#67C8FF"
        [6]=>
        string(7) "#67C8FF"
        [7]=>
        string(8) "#DFFFA5
    "
      }
      [1]=>
      array(8) {
        [0]=>
        string(4) "2000"
        [1]=>
        string(21) "kyle8@example.com"
        [2]=>
        string(9) "127.0.0.1"
        [3]=>
        string(39) "Wednesday 5th September 2007 @ 18:15-29"
        [4]=>
        string(10) "4de1e777b9"
        [5]=>
        string(7) "#FFA54F"
        [6]=>
        string(7) "#67C8FF"
        [7]=>
        string(8) "#DFFFA5
    "
      }
      [2]=>
      array(8) {
        [0]=>
        string(5) "habbo"
        [1]=>
        string(22) "kyle8@example.com"
        [2]=>
        string(9) "127.0.0.1"
        [3]=>
        string(39) "Wednesday 5th September 2007 @ 18:15-53"
        [4]=>
        string(10) "603688e8ca"
        [5]=>
        string(7) "#DFFFA5"
        [6]=>
        string(7) "#67C8FF"
        [7]=>
        string(8) "#FFA54F
    "
      }
    }

  • #2
    Super Moderator Inigoesdr's Avatar
    Join Date
    Mar 2007
    Location
    Florida, USA
    Posts
    3,647
    Thanks
    2
    Thanked 406 Times in 398 Posts
    print_r($array[1]);

  • Users who have thanked Inigoesdr for this post:

    kyle2k (09-05-2007)

  • #3
    New to the CF scene
    Join Date
    Sep 2007
    Posts
    7
    Thanks
    2
    Thanked 0 Times in 0 Posts
    Thanks


  •  

    Posting Permissions

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