My foreach logic in an array wrong to send emails with items in array
If you have some time to help me with this:
I am trying to get emails to be sent with items in an array that pertain to that email address only. In Line 226 you'll see my attempted code. If it works, then I change line 290 to $itemNames (notice the plural), to list those items. But I need help with Logic. I would like, instead of emails sent each time per one item (in the iteration), to send all items in one email per client email only.
I've attached the file.