数组转字符串

<?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 ) ) "

原文地址:https://www.cnblogs.com/clubs/p/10740734.html