In a previous example ...
<?php
function array_trim ( $array, $index ) {
if ( is_array ( $array ) ) {
unset ( $array[$index] );
array_unshift ( $array, array_shift ( $array ) );
return $array;
}
else {
return false;
}
}
?>
This have a problem. if u unset the last value and then use
<?
array_unshift ( $array, array_shift ( $array ) );
?>
will return a : Array ( [0] => )
so u can fix it using...
<?php
if (count($array) > 0) array_unshift ( $values, array_shift ( $values ) );
?>
good luck ;)