From 7e46cf0e1817ba0f818d563eefcdee2017ccce7f Mon Sep 17 00:00:00 2001 From: Philip Olson Date: Sun, 14 Jul 2002 01:16:48 +0000 Subject: [PATCH] usort($arr, 'strnatcmp') to keep index/value associations. git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@88629 c90b9560-bf6c-de11-be94-00142212c4b1 --- reference/array/functions/natsort.xml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/reference/array/functions/natsort.xml b/reference/array/functions/natsort.xml index d68bb44f4e..c005bc67bb 100644 --- a/reference/array/functions/natsort.xml +++ b/reference/array/functions/natsort.xml @@ -1,5 +1,5 @@ - + @@ -26,6 +26,7 @@ <function>natsort</function> example ]]> @@ -68,6 +70,12 @@ Array url="&url.strnatcmp;">Natural Order String Comparison page. + + + If you're wanting to maintain index/value associations, consider + using usort($arr, 'strnatcmp'). + + See also natcasesort, strnatcmp, and