array pop with key php code example
Example 1: php array_pop reverse
<?php
$stack = array("orange", "banana", "apple", "raspberry");
$fruit = array_shift($stack); //$fruit = "orange";
?>
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]);
}
}