Revision: 52151
Updated Code
at October 14, 2011 17:01 by wanchun0222
Updated Code
$arr = array( 'index'=>array( 'name'=>'首页','order'=>3), 'intro'=>array( 'name'=>'ä¼ä¸šæ¦‚况','order'=>2), 'news'=>array( 'name'=>'新闻动æ€','order'=>1 ), 'product'=>array( 'name'=>'产å“ä¸å¿ƒ','order'=>4 ), 'message'=>array( 'name'=>'访客留言','order'=>7 ), 'position'=>array( 'name'=>'人æ‰æ‹›è˜','order'=>6), 'contact'=>array( 'name'=>'è”系我们','order'=> 5 ) ); uasort($arr, 'cmp'); public function cmp($a, $b){ return $a['order'] - $b['order']; }
Revision: 52150
Updated Code
at October 14, 2011 17:00 by wanchun0222
Updated Code
$arr = array( 'index'=>array( 'name'=>'�页','order'=>3), 'intro'=>array( 'name'=>'����','order'=>2), 'news'=>array( 'name'=>'����','order'=>1 ), 'product'=>array( 'name'=>'产å��ä¸ÂÂ�','order'=>4 ), 'message'=>array( 'name'=>'访客��','order'=>7 ), 'position'=>array( 'name'=>'人���','order'=>6), 'contact'=>array( 'name'=>'�系�们','order'=> 5 ) ); uasort($arr, 'cmp'); public function cmp($a, $b){ return $a['order'] - $b['order']; }
Revision: 52149
Updated Code
at October 14, 2011 16:59 by wanchun0222
Updated Code
$arr = array( 'index'=>array( 'name'=>'�页','order'=>3), 'intro'=>array( 'name'=>'����','order'=>2), 'news'=>array( 'name'=>'����','order'=>1 ), 'product'=>array( 'name'=>'产å��ä¸Â�','order'=>4 ), 'message'=>array( 'name'=>'访客��','order'=>7 ), 'position'=>array( 'name'=>'人���','order'=>6), 'contact'=>array( 'name'=>'�系�们','order'=> 5 ) ); uasort($arr, 'cmp'); public function cmp($a, $b){ return $a['order'] - $b['order']; }
Revision: 52148
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at October 14, 2011 16:58 by wanchun0222
Initial Code
$arr = array( 'index'=>array( 'name'=>'首页','order'=>3), 'intro'=>array( 'name'=>'ä¼ä¸šæ¦‚况','order'=>2), 'news'=>array( 'name'=>'新闻动æ€','order'=>1 ), 'product'=>array( 'name'=>'产å“ä¸å¿ƒ','order'=>4 ), 'message'=>array( 'name'=>'访客留言','order'=>7 ), 'position'=>array( 'name'=>'人æ‰æ‹›è˜','order'=>6), 'contact'=>array( 'name'=>'è”系我们','order'=> 5 ) ); uasort($arr, 'cmp'); public function cmp($a, $b){ return $a['order'] - $b['order']; }
Initial URL
http://www.coderbolg.com/content/144.html
Initial Description
Initial Title
[php] multi-dimensional array sort
Initial Tags
sort, array
Initial Language
PHP