Answer the question
In order to leave comments, you need to log in
How to do php array insertion in html?
Can't change email send code in php. Previously, there were only POST variable fields, there were no problems, it was just sent
if (isset($_POST["color"])) {
$color = $_POST["color"];
}
if($color!='nope'){
$color_htm='<tr>Цвет: <td>'.$color.'</td></tr> ';
}
$messageBody ='
<td> '.$color_htm.'</td>
';
$messageBody ='
<table>
<tr><td> '.$color_htm.'</td></tr>
<tr><td>'.foreach ($useroption as $value) {echo $value;}.'
</table>';
Answer the question
In order to leave comments, you need to log in
Good afternoon.
There is such a construct as foreach() ;
Here, with its help, iterate over the array.
Something like this:
foreach($array as $key => $value){
echo $value;
}
$result = '';
foreach ($useroption as $value)
{
$result .= $value;
}
$messageBody ='
<table>
<tr><td> '.$color_htm.'</td></tr>
<tr><td>'.$result.'</td></tr>
</table>';
foreach ($useroption as $value)
{
$result .= '<tr><td>'.$value.'</td></tr>';
}
$messageBody ='
<table>
<tr><td> '.$color_htm.'</td></tr>
'.$result.'
</table>';
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question