php array pop by key code example
Example 1: php array remove keys keep values
<?php
$array = array("size" => "XL", "color" => "gold");
print_r(array_values($array));
?>
Array
(
[0] => XL
[1] => gold
)
Example 2: php array_pop with key
print_r(array_slice(array("a" => "1", "b" => 2, "c" => 3), -1, 1));