The code that calculates the maximum and minimum values of the PHP array. For more information, see.
The code that calculates the maximum and minimum values of the PHP array. For more information, see.
The Code is as follows:
$ Fruits = array ("155: vbscript: http://www.jb51.net/list/list_114_1.htm", "1: javascript: http://www.jb51.net/list/list_3_1.htm", "2: Regular Expression: http://www.jb51.net/list/list_6_1.htm", "3 :: common Software: http://s.jb51.net ");
Print_r ($ fruits );
Rsort ($ fruits, SORT_NUMERIC );
Print_r ($ fruits );
?>
Display result:
Array
(
[0] => 155: vbscript: http://www.jb51.net/list/list_114_1.htm
[1] => 1: javascript: http://www.jb51.net/list/list_3_1.htm
[2] => 2: Regular Expression: http://www.jb51.net/list/list_6_1.htm
[3] => 3: Common Software: http://s.jb51.net
)
Array
(
[0] => 155: vbscript: http://www.jb51.net/list/list_114_1.htm
[1] => 3: Server commonly used software: http://s.jb51.net
[2] => 2: Regular Expression: http://www.jb51.net/list/list_6_1.htm
[3] => 1: javascript: http://www.jb51.net/list/list_3_1.htm
)