remove values array condition php 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]);
}
}