I have an array:
$test1[0]= "hi";
$test1[1]= "hello";
$test1[2]= "cool man";
now, i'm going through and deleteing things from this array using a search.
so say my search turns up that I need to delete $test1[1]
i have this code then:
//array before deletion
$test1[0]= "hi";
$test1[1]= "hello";
$test1[2]= "cool man";
//delete value in array matched by search
unset($test1[1]);
now my array looks like:
$test1[0]= "hi";
$test1[2]= "cool man";
what I need to do is to numerically order the keys of this array now, so I end up with:
$test1[0]= "hi";
$test1[1]= "cool man";
how would I do this?