Hi, I have been looking at array_splice but need some help.
I have an array
ItemNumber[0] -> 124
ItemNumber[1] -> 125
ItemNumber[2] -> 126
If one is deleted I need to shift all of the other numbers up to fill in the one that was deleted
so if someone chose item 125 to delete
then my code says: unset($_SESSION['Items'][$delete]);
where $delete is = 125
then I am left with
ItemNumber[0] -> 124
ItemNumber[1] -> nothing here
ItemNumber[2] -> 126
but when I go back through the array to print it out, if I use count() I get two, so it loops through the array twice, the second value isn't printed because there isn't one and the last value is left off because the loop exits. I have looked into array_splice but I am not sure if I use this if I actually still need unset? Also I haven't been able to get array_splice to work correctly for me.