note 84732 added to function.array-splice

From: Date: Sun, 27 Jul 2008 23:39:36 +0000
Subject: note 84732 added to function.array-splice
Groups: php.notes 
Request: Send a blank email to php-notes+get-142831@lists.php.net to get a copy of this message
i miss posted the actual function... here is the real one lol <?php function q_sort(&$Info, $Index, $Left, $Right) { echo "memory usage <b>".memory_get_usage()."</b><br/>\n"; $L_hold = $Left; $R_hold = $Right; $Pivot = $Left; $PivotValue = $Info[$Left]; while ($Left < $Right) { while (($Info[$Right][$Index] >= $PivotValue[$Index]) && ($Left < $Right)) $Right--; if ($Left != $Right) { $Info[$Left] = $Info[$Right]; $Left++; } while (($Info[$Left][$Index] <= $PivotValue[$Index]) && ($Left < $Right)) $Left++; if ($Left != $Right) { $Info[$Right] = $Info[$Left]; $Right--; } } $Info[$Left] = $PivotValue; $Pivot = $Left; $Left = $L_hold; $Right = $R_hold; if ($Left < $Pivot) q_sort($Info, $Index, $Left, $Pivot-1); if ($Right > $Pivot) q_sort($Info, $Index, $Pivot+1, $Right); } ?> ---- Server IP: 209.41.74.194 Probable Submitter: 68.108.11.69 ---- Manual Page -- http://www.php.net/manual/en/function.array-splice.php Edit -- https://master.php.net/note/edit/84732 Del: integrated -- https://master.php.net/note/delete/84732/integrated Del: useless -- https://master.php.net/note/delete/84732/useless Del: bad code -- https://master.php.net/note/delete/84732/bad+code Del: spam -- https://master.php.net/note/delete/84732/spam Del: non-english -- https://master.php.net/note/delete/84732/non-english Del: in docs -- https://master.php.net/note/delete/84732/in+docs Del: other reasons-- https://master.php.net/note/delete/84732 Reject -- https://master.php.net/note/reject/84732 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#142831) next »