Language: PHP Highlight Mode: PHP Last Modified: March 01st, 2009
<? php
FUNCTION BubbleSort($sort_array,$reverse){FOR($i=0;$i<SIZEOF($sort_array);$i++){FOR($j=$i+1;$j<SIZEOF($sort_array);$j++){IF($reverse){IF($sort_array[$i]<$sort_array[$j]){$tmp=$sort_array[$i];$sort_array[$i]=$sort_array[$j];$sort_array[$j]=$tmp;}}ELSE{IF($sort_array[$i]>$sort_array[$j]){$tmp=$sort_array[$i];$sort_array[$i]=$sort_array[$j];$sort_array[$j]=$tmp;}}}}RETURN$sort_array;}?>
//Use like this :
//$array = array{10,65,32,41,1,99};
//$sorted = BubbleSort($array,0);
SQL University.net courses meet the most demanding needs of the business world for advanced education
in a cost-effective manner. SQL University.net courses are available immediately for IT professionals
and can be taken without disruption of your workplace schedule or processes.
Compared to traditional travel-based training, SQL University.net saves time and valuable corporate
resources, allowing companies to do more with less. That's our mission, and that's what we deliver.