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 sub地址DHCP问题
  • ¥15 delta降尺度计算的一些细节,有偿
  • ¥15 Arduino红外遥控代码有问题
  • ¥15 数值计算离散正交多项式
  • ¥30 数值计算均差系数编程
  • ¥15 redis-full-check比较 两个集群的数据出错
  • ¥15 Matlab编程问题
  • ¥15 训练的多模态特征融合模型准确度很低怎么办
  • ¥15 kylin启动报错log4j类冲突
  • ¥15 超声波模块测距控制点灯,灯的闪烁很不稳定,经过调试发现测的距离偏大