PHP Array to email

Ask about general coding issues or problems here.

Moderators: egami, macek, gesf

Post Reply
User avatar
php-forum GURU
php-forum GURU
Posts: 300
Joined: Sun Dec 11, 2011 12:51 am
Location: Shrewsbury, Shropshire

Thu Nov 08, 2012 11:44 pm

It is very difficult to advise without seeing how you are generating your emails but what you do need to use is a foreach

Code: Select all

foreach ($_POST['i_have'] as $ihave) {
$html .= $ihave;
php-forum Fan User
php-forum Fan User
Posts: 53
Joined: Wed Oct 10, 2012 12:14 am

Thu Nov 08, 2012 11:56 pm

You can also use the implode() function to join them in a comma separated string:

$checked = trim(stripslashes(implode(",", $_POST['i_have'])));
Post Reply