$array = array( 'ab'=>123, 'ef'=>234, 'hc'=>654, 'ht'=>456, 'ty'=>421, ); 那我是不是要ab hc 换位 // ef ht换位// hc ht 换位 ??? 你总的有个参考吧 ------解决方案-------------------- 数组循环一次,O(n)复杂度,效率有什么问题? ------解决方案-------------------- 我感觉foreach 就ok了 一个数组不存在什么效率问题吧
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn