PX : code

bubblesort by Petter Nilsen
Download this code


<?php
    
function bubblesort($a1,$a2)
    {
        for(
$i sizeof($a1); $i >= 1$i--)
        {
            for(
$j 1$j <= $i$j++)
            {
                if(
$a1[$j-1] > $a1[$j])
                {
                    
$t $a1[$j-1];
                    
$t2 $a2[$j-1];
                    
$a1[$j-1] = $a1[$j];
                    
$a2[$j-1] = $a2[$j];
                    
$a1[$j] = $t;
                    
$a2[$j] = $t2;
                }
            }
        }
    }
?>

Comments or questions?
PX is running PHP 5.2.17
Thanks to Miranda Productions for hosting and bandwidth.
Use of any code from PX is at your own risk.