Php 从数组获取值时遇到问题注意:未定义索引:
我试图使用以下命令将post_id设置为变量,但得到一个未定义的索引错误Php 从数组获取值时遇到问题注意:未定义索引:,php,arrays,wordpress,Php,Arrays,Wordpress,我试图使用以下命令将post_id设置为变量,但得到一个未定义的索引错误 $propertyID['post_id'] 这是我的var_dump() 您必须使用数组的索引0中的所有值:- $propertyID[0]['post_id'] //result :- 4323 $propertyID[0]['meta_key'] //result :- unique_id 使用$propertyID[0]['post_id'] $propertyID[0]['post_id'] //result
$propertyID['post_id']
这是我的var_dump()
您必须使用数组的索引0中的所有值:-
$propertyID[0]['post_id'] //result :- 4323
$propertyID[0]['meta_key'] //result :- unique_id
使用$propertyID[0]['post_id']
$propertyID[0]['post_id'] //result :- 4323
$propertyID[0]['meta_key'] //result :- unique_id