php array splice remove one element code example
Example: php erase element from array
foreach ($items as $key =>$item){
if(condition){
unset($item[$key]);
}
}
foreach ($items as $key =>$item){
if(condition){
unset($item[$key]);
}
}