note 89772 deleted from function.sort by thiago
| From: | thiago@php.net | Date: | Mon, 23 Mar 2009 04:26:56 +0000 |
| Subject: | note 89772 deleted from function.sort by thiago | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-152312@lists.php.net to get a copy of this message | ||
Note Submitter: Hayley Watson
----
This will also do what Oto Brglez's code does, without a running time that increases towards
infinity as more keys are requested (it triggers a warning instead).
<?php
$pom_k = array_rand($rows, $st);
if($st==1) $pom_k = array($pom_k);
sort($pom_k);
?>