prakashchhetri
prakashchhetri

Reputation: 1816

Mail all values of $_POST array

I want to mail all the values that are send through form in a $_POST array.

I looped through the array for each element and stored it in another variable say $results concatinating the results.

But when I mail them, they are combined together

I used

foreach($_POST as $key=> $value){ $results .= $key .":".$value."\n"; }

I even used <br/> in place of \n but same result, al values in the same line. What should i use?

Upvotes: 0

Views: 204

Answers (1)

Will Bickford
Will Bickford

Reputation: 5386

Standard mail format uses \r\n not \n. Try using that style of new line.

Upvotes: 2

Related Questions