title: Bubble sort implementation in PHP?
body: <p>I need to do a bubble sort algorithm in PHP.</p>
  
  <p>I want to know whether any one has any good examples that I can use, or an open source library which can do this.</p>
  
  <p>I have a few spaces in a set (array), i want to fill these spaces with object (a person), so no space can have a male and a female, this why i am trying to find out a bubble sort algorithm.</p>
  
  <p>My plan is to fill in any of the available spaces regardless of the gender, and after that sort them separately.</p>
  
  <p>Thanks.</p>