I have an array in a variable called $ids, the array looks like this:
Array
(
[0] => Array
(
[id] => 1
)
[1] => Array
(
[id] => 7
)
) etc
I need to use it in a WHERE id IN ($ids);
How do i go about it?
Thanks.
Your problem statement is a bit confusing. But you seem to want to know what you’re trying to do, except you don’t know how to compile the list of ids? If that is the case, try this:
If you have a PHP version less than 5.3, you can’t use anonymous functions. Use the code below instead.