$languages = array('French','German','Russian','Chinese','Hindi', 'Quechua');
printf("Original array:
%s
\n", var_export($languages, TRUE));
$removed = array_shift($languages);
printf("Using array_shift():
Removed element: %s
%s
\n",
$removed, var_export($languages, TRUE));
$removed = array_pop($languages);
printf("Using array_pop():
Removed element: %s
%s
\n",
$removed, var_export($languages, TRUE));
unset( $languages[count($languages) - 1] );
printf("Using unset() and count():
%s
\n",
var_export($languages, TRUE));
?>