two arrays:
$columns = array('mail', 'phone', 'author', 'title');
$values = array('some mail', 'some phone', 'an author', 'a title');
Is it possible something like this:
$sql = "insert into actual (" . implode(', ', $columns) . ") values (" . implode(', ', $values) . ")";
$st = $db->prepare($sql);
$st->execute(); // line 23
I tried and got a syntax error on line 23.
$valuesarray in theexecute()var_dump($columns)?mysqliand PDO where any user-supplied data is specified with a?or:nameindicator that’s later populated usingbind_paramorexecutedepending on which one you’re using.