Array to string conversion error when using implode Array to string conversion error when using implode arrays arrays

Array to string conversion error when using implode


You have an array of arrays... Try this:

$error_c = implode(',', $matches[0]);


$error_c = implode(',', $matches[0]);echo $error_c;

because your array contains arrays inside


You may use array_values() for array of arrays

e.g. implode (",", array_values($array))