how we can sort and asort digit without using default function of php....?
1
Expert's answer
2013-03-15T09:09:29-0400
To perform this task, we canuse the following method: compare each element of the array, and the larger of the two compared move to the right side, thus sorting array in ascending order. Below is the code, which is based on this method. <?php $input= array(0.1,77,0.5,6.2,6,2,4); for($i=0;$i<count($input)-1;$i++) for($c=0;$c<count($input)-1;$c++){ if($input[$c]>$input[$c+1]){ $t=$input[$c]; $input[$c]=$input[$c+1]; $input[$c+1]=$t; } } print_r($input); ?>
Finding a professional expert in "partial differential equations" in the advanced level is difficult.
You can find this expert in "Assignmentexpert.com" with confidence.
Exceptional experts! I appreciate your help. God bless you!
Comments