I am saving values with add_user_meta within the same meta key.
What I need is to separate them with commas when getting them with foreach so I can send them by wp_mail.
I need something like this:
1@gmail.com, 2@hotmail.com, 3@gmail.com
but when obtaining them directly, it returns them all together and glued.
some help?
$email = get_user_meta ($vendor_id, 'list_email', false);
foreach ($email as $emails) {
echo $emails;
}
Result:
1@gmail.com2@hotmail.com3@gmail.com
I tried some options, but the comma in front must be from the second email to be readable in wp_mail and I don't understand how to do it