<?php $b = array ('m' => 'monkey', 'foo' => 'bar', 'x' => array ('x', 'y', 'z')); $results = print_r ($b, true); // $results 包含了 print_r 的输出结果 var_dump($results); ?>
打印
string(146) "Array ( [m] => monkey [foo] => bar [x] => Array ( [0] => x [1] => y [2] => z ) ) "