php.js : print_r() function
print_r() function
The print_r() function is used to display information about a variable.
Version:
1103.1210
Syntax:
print_r(variable1, return_val)
Parameters:
Name | Description | Required / Optional |
Type |
---|---|---|---|
variable1 | The variable being checked | Required | Mixed* |
return_val | Use return parameter to capture the output of print_r(). | Optional | Boolean |
*Mixed : mixed indicates that a parameter may accept multiple (but not necessarily all) types.
Example : php.js print_r() function
In the following web document, print_r() functions display information of various variables.
Output of the example:
678 a678 678 W3resource.com 698.99
View example of php.js print_r() function in browser
Previous: php.js : isset() function
Next:
php.js : serialize() function