Search code examples
phpwhatsappline-breaks

How to create line break in WhatsApp message?


I am working on PHP side to write dynamic messages for WhatsApp. But when i send message then unable to add new line break. i have tried following codes inside content but not working for my case: %0D %0a \n \r\n %0D%0A

i.e first line \n second line %0a third line \r\n fourth line ;br; fifth line


Solution

  • I have tried PHP_EQL and its working.

    i.e echo "First Line".PHP_EQL."Second Line";

    Output is
    First Line
    Second Line