使用内爆时的数组到字符串转换错误
我对我得到的错误感到困惑Array to string conversion
我感到困惑的原因是我试图做到这一点,将数组转换为字符串,根据手册,使用它应该允许我将数组转换为字符串。那么,为什么我会收到错误呢?implode
var 是一个数组。 是我要存储字符串的 var。$matches
$error_c
print_r($matches); // prints the array correctly
$error_c = implode(',', $matches);
echo $error_c;
简单地输出并给出:array
Notice: Array to string conversion in ...
手册指出,那么为什么当我尝试这样做时会出现错误?implode — Join array elements with a string
编辑:这是我从中获得的输出$matches
Array ( [0] => Array ( [0] => C [1] => E [2] => R [3] => R [4] => O [5] => R [6] => C [7] => O [8] => N [9] => T [10] => A [11] => C [12] => T [13] => S [14] => U [15] => P [16] => P [17] => R [18] => E [19] => S [20] => S [21] => E [22] => D ) )