I am doing an implode on my array:
$values = "('".implode("', '", $array)."')";
It gives me results like this:
('abc', '123', 'apple123', 'hello', '345')
I need it to look like below, so the numbers will not be in quotation marks:
('abc', 123, 'apple123', 'hello', 345)
The problems is that the mysql database doesn't want to import the data properly. It sees the numbers as strings and gives them max possible int value so the imported values do not match what I have.
Is there any way to add some more instructions to implode so it would recognize what is number and what is not?