显示下拉菜单

print_r()

« prev | printf »
<?php
ob_start
();

$mixed print_r (
    
// mixed $expression
    
?  // [bool $return = false]
);

$contents ob_get_contents();
ob_end_clean();
?>
结果
$mixed = true
$contents = 'Array
(
    [a] => apple
    [b] => banana
    [c] => Array
        (
            [0] => x
            [1] => y
            [2] => z
        )

)
'
示例
#1 print_r  (["a" => "apple""b" => "banana""c" => [=> "x"=> "y"=> "z"]])
#2 print_r  (["m" => "monkey""foo" => "bar""x" => [=> "x"=> "y"=> "z"]],
 
true)
另请参阅
var_dump, var_export