有没有字典在PHP?
例如:
$names = {[bob:27, billy:43, sam:76]};
然后能够像这样引用它:
$names[bob]
看下面的代码示例。
它可能在5.4 PHP或更大。
<?php $array = array( "foo" => "bar", "bar" => "foo", ); // as of PHP 5.4 $array = [ "foo" => "bar", "bar" => "foo", ]; ?>