For example I have the following code:
$sample = array('apple', 'orange', 'banana', 'grape');
I want to rearrange this array, by making $sample[2] the new $sample[0], while keeping the same order throughout the array.
Output should be:
Array ( [0] => banana [1] => grape [2] => apple [3] => orange)