php remove element from array by condition code example
Example: php conditionally remove element from array
foreach ($array as $key => $element) {
if ($element['age'] > 90) {
unset($array[$key]);
}
}
foreach ($array as $key => $element) {
if ($element['age'] > 90) {
unset($array[$key]);
}
}