Hey there,
I have a form which collects information from a user, and I want to concatenate that into a single variable (to go in the description field in Espo). Everything is working fine, except that I can't add line breaks into the string.
Here is my current code:
This is what I get (which is exactly what I expect from the above):
This is what I want:
Here is what I have tried:
In each scenario, the characters I am entering in the string are just displaying in the description box, as in, it's not recognising it as HTML code, but as plain text.
Does anyone have any thoughts?
I have a form which collects information from a user, and I want to concatenate that into a single variable (to go in the description field in Espo). Everything is working fine, except that I can't add line breaks into the string.
Here is my current code:
Code:
$message = "This is the message here"; $ipAddress = "123.123.123.132"; $desc = 'Message: ' . $message . ' | IP Address: ' . $ipAddress;
Code:
Message: This is the message here | IP Address: 123.123.123.132
Code:
Message: This is the message here. IP Address: 123.123.123.123
Code:
$desc = 'Message: <br> ' . $message . ' <br><br>IP Address:<br>' . $ipAddress;
Code:
$desc = 'Message:/l/n ' . $message . ' /l/nIP Address:/l/n' . $ipAddress;
In each scenario, the characters I am entering in the string are just displaying in the description box, as in, it's not recognising it as HTML code, but as plain text.
Does anyone have any thoughts?
Comment