How to use print_r function in php
This article mainly introduces how to use the print_r function in php, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let Xiaobian take you to understand it.
Print_r function
The print_r function prints easy-to-understand information about variables.
Syntax:
Mixed print_r (mixed $expression [, bool return])
If the variable is string, integer or float, it will output its value directly, and if the variable is an array, it will output a formatted array that is easy to read, that is, the format corresponding to key and value.
The same for object objects.
Print_r has two parameters, the first is a variable, the second can be set to true, if set to true, a string is returned, otherwise a Boolean value TRUE is returned.