Hello group,
On "http://www.zend.com/codex.php?id=501&single=1" there is very interesting script for array sorting. But, when I run it php gives me this error:
<I>Warning: Call-time pass-by-reference has been deprecated - argument passed by value; If you would like to pass it by reference, modify the declaration of array_multisort(). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file. However, future versions may not support this any longer. in D:\subsections\subsections_2\107.des(127) : eval()'d code on line 1</I>
What it means ?? Can we do somethink with it ?? Below this function:
function aasort(&$array, $args) {
foreach($args as $arg) {
$order_field = substr($arg, 1, strlen($arg));
foreach($array as $array_row) {
$sort_array[$order_field][] = $array_row[$order_field];
}
$sort_rule .= '$sort_array['.$order_field.'], '.($arg[0] == "+" ? SORT_ASC : SORT_DESC).',';
}
eval("array_multisort($sort_rule".' &$array);');
}