摘要: php里面有个函数可以反转数组,工作中也经常用到,非常方便。今天来自己实现这样的功能。 $arr = [2,5,6,1,8,16,12]; function reverse($arr){ $left = 0; $right = count($arr) -1; $temp = []; while ($ 阅读全文
posted @ 2018-02-08 16:40 songguojun 阅读(5494) 评论(0) 推荐(0) 编辑