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
array
arrays
You may use array_values() for array of arrays
e.g. implode (",", array_values($array))
implode (",", array_values($array))