|
Hello - I've figured out how to delete an array from an array of arrays , but am having touble inserting an array into an array of array. (I know, tongue twister ...)
I've got:
$row_0 = array ("Row_A", " fooA", " fooA");
$row_1 = array ("Row_B", " fooB", " fooB");
$row_2 = array ("Row_C", " fooC", " fooC");
$row_3 = array ("Row_D", " fooD", " fooD");
$multi = array ($row_0, $row_1, $row_2, $row_3);
I'm pretty sure the following line of code wipes out the array named $row_1
array_splice ($multi, 1, 1 ); // starting at $multi[1] , take out 1 element
however ...
How do I get that array back into the multi array should I decide I want it back in its original position, or at any position for that matter?
I tried:
$new = $row_1;
array_splice ($multi, 1, 0, $new );
but no luck.
|