I have a custom post type, which has email and names stored. I would like to take these email addresses and concatenate (join them) together into a single string. This string will be stored in a variable, and I will then assign this variable to the $email_to
in wp_mail. Using a cron, the latest 3 posts will then be sent to the email addresses over a chosen frequency.
My Q: I am just looking for someone to point me in the right direction. Should I use a foreach
to loop through all of these stored email addresses in the custom post type, and then concatenate them to the string stored in the variable?
UPDATE I am not looking for someone to provide the code (that would be unreasonable). I am looking for a yes or no, & a little bit of guidance if possible.
join()
?