php remove object from array by property code example
Example: php remove object from array by property
$new_array = [];
foreach ($myarray as $key => $value) {
if ($value->catid == 29) {
$new_array[] = $value;
unset($myarray[$key]);
}
}