This is probably simple, but I can't seem to get this to work.
I have an array I'm trying to filter in a 'for' loop. The for loop checks $array[$i] and if it meets criteria in an 'if' statement, it needs to be removed from the array.
I have tried unset ($array[$i]) but the variable pops up (is not removed) after the for loop terminates. I have tried array_splice($array,$i,1) but that doesn't work for me either. I then tried $array[$i] = NULL but that returned a memory allocation error that stopped the script.
All it has to do is remove the element from the array, based on some sort of loop that processes each element in the array.
Any help would be more than appreciated.
Thank you!