3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $data = array( 'coluna' => 'valor', 'coluna2' => null, 'coluna3' => 123 ); $cols = implode( ', ', array_keys( $data ) ); $values = implode( ', ', $data ); echo "INSERT INTO table ($cols) VALUES ($values)";
based on fIFTj
Output for 4.3.0 - 7.1.7
INSERT INTO table (coluna, coluna2, coluna3) VALUES (valor, , 123)