I'm trying to make a following query:
SELECT * FROM data WHERE ID IN ('$data')
While the $data
is:
Array
(
[0] => 2
[1] => 4
)
But the output is: "Array to string conversion"
However if I do SELECT * FROM data WHERE ID IN (2, 4)
everything works!
How do I change the array to this kind of string of numbers, please?