代码如下:
PHP
$fruits = array("155::vbscript:://www.jb51.cc/list/list_114_1.htm","1::javascript:://www.jb51.cc/list/list_3_1.htm","2::正则表达式:://www.jb51.cc/list/list_6_1.htm","3::服务器常用软件::http://s.jb51.cc");
print_r($fruits);
rsort($fruits,SORT_NUMERIC);
print_r($fruits);
?>
$fruits = array("155::vbscript:://www.jb51.cc/list/list_114_1.htm","1::javascript:://www.jb51.cc/list/list_3_1.htm","2::正则表达式:://www.jb51.cc/list/list_6_1.htm","3::服务器常用软件::http://s.jb51.cc");
print_r($fruits);
rsort($fruits,SORT_NUMERIC);
print_r($fruits);
?>
显示结果: Array
(
[0] => 155::vbscript:://www.jb51.cc/list/list_114_1.htm
[1] => 1::javascript:://www.jb51.cc/list/list_3_1.htm
[2] => 2::正则表达式:://www.jb51.cc/list/list_6_1.htm
[3] => 3::服务器常用软件::http://s.jb51.cc
)
Array
(
[0] => 155::vbscript:://www.jb51.cc/list/list_114_1.htm
[1] => 3::服务器常用软件::http://s.jb51.cc
[2] => 2::正则表达式:://www.jb51.cc/list/list_6_1.htm
[3] => 1::javascript:://www.jb51.cc/list/list_3_1.htm
) 原文链接:https://www.f2er.com/php/27546.html