3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $data = [ [ 'base' => '"b"', 'translation' => 't', 'is_visible' => '1' ], [ 'base' => 'b2', 'translation' => 't2', 'is_visible' => '1' ] ]; foreach ($data as &$values) { foreach ($values as &$value) { $value = str_replace('"', '""', $value); } $values['base'] = '"' . $values['base'] . '"'; $values['translation'] = '"' . $values['translation'] . '"'; $values['is_visible'] = $values['is_visible'] == '1' ? 't' : 'f'; print_r(implode($values, ',') . PHP_EOL); }
based on 5enAa
Output for 5.6.0 - 5.6.30, hhvm-3.15.4, 7.0.0 - 7.2.6
"""b""","t",t "b2","t2",t