I know this is most likely a simple question for you pro's (i'm still new).
I have an array:
$x = array('apple','orange','pair','grape');
And I have a variable, that just so happens to be also in that array:
$v = 'pair';
I want to sort that array, so that $v is the first thing in the array. Hence, the result should be:
$x = array('pair','orange','apple','grape');
(note it was moved, not copied to the front... still only appears once).
Is there a built in function or some easy mechanism to do this automatically?