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

    Question Extracting info from an array thats located in a array!

    I have an array named Task and inside the array is another Array it looks like this
    [task] => Array ( [0] => prr [1] => tyh [2] => rfd [3] => sds [4] => yui [5] => rtr [6] => wer )

    I need to find out how to extract the initials prr, tyh, rfd,sds,yui,rtr,and wer is there any way possible to do that so i can send each set to my database?

  • #2
    Regular Coder
    Join Date
    Jul 2007
    Location
    UK
    Posts
    223
    Thanks
    0
    Thanked 14 Times in 14 Posts
    Like this:
    PHP Code:
    $myArray = array('task' => Array ( => 'prr'=> 'tyh'=> 'rfd'=> 'sds'=> 'yui'=> 'rtr'=> 'wer' ));
     print 
    $myArray['task'][0]; //prints prr
     
    print $myArray['task'][1]; //prints tyh 


  •  

    Posting Permissions

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