You wouldn't think was so hard, but I often come across this when processing textarea input in a contact form, into the email to the client....
A long story cut short... the solution I found was below:
$msg = '<p>Address: <br />'.str_ireplace(array("\r\n",'\r\n'),'<br />', $address)."</p>";
The format is simply str_ireplace(array("\r\n",'\r\n'),'<br />', $addressVariable);
Thanks to: Sandeep Tawaniya for the solution, found here.
Main Category
Secondary Categories