pop element at key php code example
Example 1: php erase element from array
foreach ($items as $key =>$item){
if(condition){
unset($item[$key]);
}
}
Example 2: php foreach array pop
foreach ($display_related_tags as $key => $tag_name) {
if($tag_name == $found_tag['name']) {
unset($display_related_tags[$key]);
}
}