note 96708 deleted from function.array-multisort by danbrown
| From: | danbrown@php.net | Date: | Fri, 12 Mar 2010 13:17:01 +0000 |
| Subject: | note 96708 deleted from function.array-multisort by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-166956@lists.php.net to get a copy of this message | ||
Note Submitter: patrick at procurios dot nl
----
Update to d_inkubus' fix for array_msort() in PHP 5.3:
Adding the array_multisort parameters as references like this doesn't work because it
repeatedly adds a reference to a temporary foreach variable. A fix for this could be:
<?php
$order = (array)$order;
foreach($order as $i => $order_element)
{
$params[]= &$cols[$col][$i];
}
?>