This question already has an answer here:
- PHP/MYSQL using an array in WHERE clause 14 answers
I am sure this is something simple, but I can't find it anywhere:
How can I change an array like this:
{ [0]=> string(3) "674" [1]=> string(3) "675" [2]=> string(3) "676" [3]=> string(3) "677" }
into a simple one like this:
(674,675,676,677)
For use in another SQL (IN) query?
I have tried imploding and it fails.
$myarray_value = implode( ',', $myarray );
var_dump
ing. – The Alpha Sep 20 '13 at 18:23