note 109456 deleted from function.sort by googleguy
| From: | googleguy@php.net | Date: | Tue, 24 Jul 2012 04:00:17 +0000 |
| Subject: | note 109456 deleted from function.sort by googleguy | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-189381@lists.php.net to get a copy of this message | ||
Note Submitter: Anonymous
----
For some reason, it sees SORT_NATURAL and other flags as string instead of long ("sort()
expects parameter 2 to be long, string given"). A workaround is simply using a number.
I've found that passing 5 as the second argument does what I want: sort case-insensitive.
Reading more comments, it seems natcasesort() also works.
Just wanted to share this workaround, especially since there don't seem to be good google
results for this error.