I am French, so I do not speak English very well.
I am trying to "put" the result of a foreach loop into a variable as follows:
$msg = '<html><head>
<title>Commande de photos</title>
</head><body>
<p>Voici la liste des photos demandées :<br />
<ul> HERE I WANT TO "PUT" THE RESULT OF THE FOREACH LOOP</ul>';
Here is my foreach loop:
foreach($tab as $val){
echo('<li>'.$val.'</li>');
}
Then $msgenter the mail()following into the composition of the function :
mail($destinataire,$sujet,$msg,$headers);
So, how can I do this to include the foreach result in the message because I already have an error?
source
share