I am using a variable, $messagetext, to save the text to be send in a notification. The notification is send through email, but it also can be displayed in the ui of the web app. It would be convenient for me to insert a new line character in the text instead since I use a single $this->message->line($messagetext) command to construct the message, instead of creating multiple strings and then iterating to add them in separate ->line() arguments.
My $messagetext is:
$messagetext = "text"
I have tried "text \n text ", "text text ", "text nl2br(\n) text " and other variations of them with single, double quotes, attach dots, etc Am I missing something?
Maybe you can add some logic yourself to handle and split the line breaks to two separate strings.
I've never used this approach myself before but I think it could work.
@Snapey thank you. That doesn't work either. Also tried it with various brackets and quotes. I can't seem to be able to insert html code in the string that will be translated as html.