Here is a little function if you would like to get the top element and rotate the array afterwards.
function array_rotate(&$arr)
{
$elm = array_shift($arr);
array_push($arr, $elm);
return $elm;
}
Here is a little function if you would like to get the top element and rotate the array afterwards.
function array_rotate(&$arr)
{
$elm = array_shift($arr);
array_push($arr, $elm);
return $elm;
}