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

php 打印数组内容_打印PHP数组的内容_第1张图片

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 打印数组内容

你可能感兴趣的:(php,python,java,linux,laravel)