Forum Moderators: coopster
newbie here and unsure which array function to use.
I have an array of arrays such as
(0=>0 1 2) (1=>4 3 5 6) (2=>3 4 7 8 9)
which I would like to be a single dimension array of
(0 1 2 4 3 5 6 3 4 7 8 9 )
Whats the most efficient way of doing this?
Also what is the best way of removing a number of elements from an array
eg
$arr1=array(0 4 5 8 9 10 )
$arr2=array ( 5 8)
remove($arr1,$arr2) gives me
0 4 9 10
thanks ins advance
Shumit
$arr = array(
"0" => "0 1 2",
"1" => "4 3 5 6",
"2" => "3 4 7 8 9"
);
then you can do this:
$arr[0] //returns 0 1 2
and so on for the rest.
I'm not really understanding exactly what you want done but thats the basics of arrays.
[edited by: PokeTech at 2:47 pm (utc) on June 28, 2008]