Okay...I am looking at that stuff and it seems to fit, conceptually, however I don't seem to get how to use it concretely.
Say I have an array like this
$picturenames=Array([0] => "pic0.JPG", [1] => "pic1.JPG", [2] => "pic2.JPG")
and I want to put the middle picture pic1.JPG (element 1) into the first place or the last place relative to the others (ie. the array should now look like this:
$picturenames=Array([0] => "pic1.JPG", [1] => "pic0.JPG",[2] => "pic2.JPG")
or this
$picturenames=Array([0] => "pic0.JPG", [1] => "pic2.JPG",[2] => "pic1.JPG")