php conditionally remove element from array 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]);
}
}