Dear all
i can not find anyway to solve my problem as below:
i have a form post from other page:

<?php
$field1 = $_POST['field1'];
$field2 = $_POST['field2'];
$field3 = $_POST['field3'];
$field4 = $_POST['field4'];

$stmt = $db->prepare("INSERT INTO table(`field1`, `field2`, `field3`,`field4`) VALUES(?, ?, ?, ?)");
$stmt->execute(array($field1, $field2, $field3, $field4));

?>

what i wanted is when add fieldname the question mark (?) auto create and separate by comma but i can not find the way to loop it or create it anybody good knowledge or experience with it please help me

thanks advance.