Answer the question
In order to leave comments, you need to log in
And again $_POST How to split an array?
The code:
$body = "Пользователь заказал: <br>";
$mail_subject = "Заказ";
$to = "почта";
$mail_headers="content-type:text/html; charset=UTF-8";
foreach($_POST as $key => $array){
$body .= "{$key}: {$array}<br />";
}
mail($to, $mail_subject, $body, $mail_headers);
Answer the question
In order to leave comments, you need to log in
You need to study the php.net/array
documentation .
This, of course, is not as fun as scribbling questions of the same type on a toaster, but more efficient.
If you need key-value pairs, you can put them in json.
If just values:
$arr = $_POST;
$stroka = implode(",", $arr);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question