• Resolved Shalom Taiwo

    (@shalomt)


    I’m trying to add a new line in a PHP code but all to no avail. I’ve tried \r\n and even tried using the HTML break like but it’s just not working. These are the ones I tried:

    $message .= '<br>Thank you for registering. <br>';
    in other cases I tried:

    $message .= nl2br('\r\n Thank you for registering. \r\n ');
    I really don’t know much about coding and I’ll really appreciate the help.

Viewing 1 replies (of 1 total)
  • Thread Starter Shalom Taiwo

    (@shalomt)

    I already got it.
    I used

    $message .= PHP_EOL. ‘Thank you for registering.’ . PHP_EOL;

    someone from StackOverflow helped.

Viewing 1 replies (of 1 total)
  • The topic ‘Adding Line breaking PHP code (for custom plugin)’ is closed to new replies.