A simple selection sort in PHP