我如何在 php 数组中传递一个空键
如果没有这样的键,我如何获取数组内容,
$products[0]
这将使我部分到达那里,但我如何过去[]
( [0] => Array
( [] => Array (
[0] => Array ( [product_name] => stuff i need to get to )
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 )
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
这很奇怪。你可以尝试
That is very strange. You could try
使用 var_dump 或 var_export 打印数组,您将看到它是一个空字符串。
print_r 将为您提供与空字符串类似的输出。
Use var_dump or var_export to print your array and you will see its an empty string.
print_r will give you output like that for empty strings.