...

View Full Version : Extracting info from an array thats located in a array!



porsche21
08-10-2007, 04:20 PM
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?

mcjwb
08-10-2007, 10:31 PM
Like this:

$myArray = array('task' => Array ( 0 => 'prr', 1 => 'tyh', 2 => 'rfd', 3 => 'sds', 4 => 'yui', 5 => 'rtr', 6 => 'wer' ));
print $myArray['task'][0]; //prints prr
print $myArray['task'][1]; //prints tyh



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum