how to remove particular value from array in php code example
Example 1: php remove specific element from array
if (($key = array_search('strawberry', $array)) !== false) {
unset($array[$key]);
}
Example 2: php remove element from array by value
// matrix array
foreach($appsList as $key => $app) {
if($app["app_status"] !== "approved") {
// remove orange apps
unset($appsList[$key]);
}
}