douzi8127 2017-08-17 06:50
浏览 19
已采纳

如何实现哈希表,PHP中的地图[重复]

This question already has an answer here:

I am looking forward to build an application in PHP. In the application I will need a hash table and maps. How to implement this in PHP, can we do this using an associative array? Is there any way to do this?

</div>
  • 写回答

1条回答 默认 最新

  • douyuan4825 2017-08-17 07:01
    关注

    In the first paragraph on the array documentation, it says:

    An array in PHP is actually an ordered map. A map is a type that associates values to keys. This type is optimized for several different uses; it can be treated as an array, list (vector), hash table (an implementation of a map), dictionary, collection, stack, queue, and probably more. As array values can be other arrays, trees and multidimensional arrays are also possible.

    http://php.net/manual/en/language.types.array.php

    So, you might be searching to do what's already done.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥20 机器学习能否像多层线性模型一样处理嵌套数据
  • ¥20 西门子S7-Graph,S7-300,梯形图
  • ¥50 用易语言http 访问不了网页
  • ¥50 safari浏览器fetch提交数据后数据丢失问题
  • ¥15 matlab不知道怎么改,求解答!!
  • ¥15 永磁直线电机的电流环pi调不出来
  • ¥15 用stata实现聚类的代码
  • ¥15 请问paddlehub能支持移动端开发吗?在Android studio上该如何部署?
  • ¥20 docker里部署springboot项目,访问不到扬声器
  • ¥15 netty整合springboot之后自动重连失效