php 打印数组内容_打印PHP数组的内容

php 打印数组内容

php 打印数组内容

This is a pretty common task, but it’s surprising how many PHP newbies don’t know about it yet. If you want to see the structure of your PHP Array, all you need to do is this:

这是一个非常普通的任务,但是令人惊讶的是,有许多PHP新手还不了解它。 如果您想查看PHP Array的结构,只需要做的是:

print_r($myarray);

print_r($ myarray);

This will give you a listing of all the items in the array, including multi-dimensional arrays. Obviously this should only be used for testing / debugging purposes.

这将为您提供阵列中所有项目的列表,包括多维阵列。 显然,这仅应用于测试/调试目的。

翻译自: https://www.howtogeek.com/howto/programming/printing-the-contents-of-a-php-array/

php 打印数组内容

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值