I have this array
$a = Array("a","b","c","d");
I want to rotate b, c, d. That is, B is placed where d and the position is lowered.
Example:
abcd
acdb
adbc
I've been here for the moment.
$a = Array("a","b","c","d");
print_r($a);
$num = count($a)-1;
for($j=0;$j<3;$j++){
for($i = $num; $i>=1;$i--){
if($i>1){
$aux = $a[$i-1];
$a[$i-1] = $a[$i];
print_r($a);
}
}
}