Roll an array $array[$first, ..., $mid, ..., $last] so that $mid is the first element. I.e., $array[$mid, ..., $last, $first, ...].
$array = array_reverse(array_merge(
array_reverse(array_slice($array, 0, $mid)),
array_reverse(array_slice($array, $mid))
));
EDIT: Should have given the description. Oops. Basically, take the first $mid elements of the array and reverse them. Take the rest of the array and reverse that. Stick the two chunks back together, then reverse the whole thing. (Missy Elliot helped me with this algorithm.)
Rolling [a,b,c,d,e,f,g,h,i] left (did I mention it was left?) by five places:
[a,b,c,d,e,f,g,h,i]
[a,b,c,d,e][f,g,h,i] slice
[e,d,c,b,a][i,h,g,f] reverse
[e,d,c,b,a,i,h,g,f] merge
[f,g,h,i,a,b,c,d,e] reverse