➤ The print_r() function prints the information about a variable in a more human-readable way. Syntax:
print_r(variable, return);  // second parameter is optional 
For instance:
$cars = array("BMW", "Ferrari", "Mustang");
print_r($cars);
$names = array("Keira Knightley"=>"37", "Mads Mikkelsen"=>"56", "Keanu Reeves"=>"58");
print_r($names);
/* outputs:
Array
(
    [0] => BMW
    [1] => Ferrari
    [2] => Mustang
)
Array
(
    [Keira Knightley] => 37
    [Mads Mikkelsen] => 56
    [Keanu Reeves] => 58
)
*/
by Levani Makhareishvili
2 years ago
PHP
Function
1
Pro tip: use ```triple backticks around text``` to write in code fences