Indexer code

More
16 years 2 weeks ago - 11 years 2 weeks ago #952 by mavericke
Indexer code was created by mavericke
I downloaded the code for INDEXER, which is working fine - except that I keep getting an error message in the index.php file referring to the functions.php file.

This is :

Code:
Warning: array_multisort() [function.array-multisort]: Argument #2 is expected to be an array or a sort flag in E:\domains\c\chetworld.co.uk\user\htdocs\Projects\functions.php on line 15

Being VERY new to PHP, I cannot work out what I am doing wrong.

If there is anyone out there who can help me it would be much appreciated

Regards

M
Last edit: 11 years 2 weeks ago by Pete.

Please Log in or Create an account to join the conversation.

More
16 years 2 weeks ago #956 by Pete
Replied by Pete on topic Indexer code
Hmm ... I am not able to duplicate this warning on Windows or Linux boxes. What version of PHP and webserver are you running?

Also, try changing the file "functions.php" to the following and see if that helps:
Code:
<?php function csort($array, $order, $column) { $i=0; for($i=0; $i<count($array); $i++) { $sortarr[]=$array[$i][$column]; } if($order == "SORT_ASC") { array_multisort($sortarr, SORT_ASC, SORT_STRING, $array); } else { array_multisort($sortarr, SORT_DESC, SORT_STRING, $array); } return($array); } ?>

Pete

DigiOz Webmaster
www.digioz.com

Please Log in or Create an account to join the conversation.

More
16 years 1 week ago #965 by mavericke
Replied by mavericke on topic Indexer code
Thanks Pete

By substituting the code you sent - problem solved.

Much appreciated

Kind regards

Mike

Please Log in or Create an account to join the conversation.

Time to create page: 0.118 seconds
Powered by Kunena Forum