php中数组自定义排序

php中数组自定义排序方法有很多,现在只提usort();不会保留原有键名。

unsort调用方法就是unsrot($arr,func);

注意:

如果func是写在当前类中的话,那么调用的方式是

unsort($arr, array($this, func));

posted @ 2013-12-06 16:01  幻星宇  阅读(401)  评论(0编辑  收藏  举报