Here an example of my array which is simply IDs of specific accounts that are "Active":
1, 12, 22, 214, 242 (It's been imploded).
$id_list = implode(", ", $ids);
What I need to do then, after imploding the array into commas, is loop through that array pulling the following information from two seperate tables:
$query = "SELECT * FROM orderItems o, items i
WHERE o.itemID = i.itemID
AND o.orderID IN($id_list)";
Basically, I need to loop through those numbers (IDs), and calculate a monthlyPayment amount from numbers I pull from orderItems and items. Then, return that monthlyPayment amount and move on to the next.
Would a for/each loop be best for this?
Thanks
B