我如何在 php 数组中传递一个空键 [英] How do i get passed an empty key in a php array

查看:31
本文介绍了我如何在 php 数组中传递一个空键的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果没有这样的键,我如何获取数组内容

how to i get to the arrays content if it doesnt have a key like this

$products[0] 

这会让我部分到达那里,但我该如何过去[]

this will get me partially there but how to i get past []

( [0] => Array 
( [] => Array ( 
[0] => Array ( [product_name] => stuff i need to get to  ) 

推荐答案

那很奇怪.你可以试试

$products[0][''][0]['product_name']

这篇关于我如何在 php 数组中传递一个空键的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆