Hello, I have an array similar to {A,B,C,D,E,F,G,H}. I would like to be able to pick an index or entry and have the array be reordered. So say if i had a function
reorder('C');
It would return the array starting at C, with anything before this index added on to the end, so this example would give
{C,D,E,F,G,H,A,B}
Is there a function that already does this?
Thanks
EDIT: I used this in the end
$key = array_search($imgToShow, $imgList);
$sliceEnd = array_slice($imgList, 0, $key);
$sliceStart = array_slice($imgList, count($sliceEnd));
$array = array_merge($sliceStart, $sliceEnd);