Maybe something like this:
$output = array();
foreach ( $array as $item ) {
$id = $item['id'];
$name = $item['name'];
// single quotes
$output[] = "['$id', '$name']";
// double quotes
$output[] = '["' . $id . '", "' . $name . '"]';
}
echo implode( ",\n", $output );
But maybe what you are looking for is a JSON?
echo json_encode( $array );