Answer the question
In order to leave comments, you need to log in
How to display data in PHPMailer?
Such a question has not previously worked with PHP.
Through ajax, data is sent from inputs (name and phone) and an object from localStorage.
There are no problems with the name and phone number in the php handler, but what comes from localStorage outputs an array, and as I understand it, the array is multidimensional.
How to output all arrays that array contains and send data via PHPMailer?
I tried to do something like this through foreach:
foreach ($data as $value){
$dex="
<span>$value[name]</span><br/>
<span>$value[price]</span><br/>
итд......
"
$body="
<span>имя</span><b>(имя из инпута)</b>
<span>имя</span><b>(телефон из инпута)</b>
<span>имя</span><b>$dex</b>
"
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question