I am getting values in an array like this:
Array
(
[0] => English
[1] => Arabic
)
I am having 2 columns in database like bel
If you want your array values to be properly formatted, you could just use implode(). Consider this example:
$values = array('English', 'Arabic');
$statement = 'INSERT INTO contact (`language1`, `language2`) VALUES ("' . implode('", "', $values) . '")';
echo $statement;
Sample Output:
INSERT INTO contact(`language1`, `language2`) VALUES ("English", "Arabic")
Important Note: You must remember that column count must have the same count as the values inside your query or else it will not work (count of columns must match the number of elements inside the array or you will have a mismatch).