使用n2blr时,html <br>标签出现在段落中

I had used this below href code for fetching the data from database & sharing it on whatsapp.

 <a href="whatsapp://send?text=<?php echo nl2br($row['invite']); ?> -:Flash-Downloads.in:-">Share</a>

the output i want is like this

Mark Robinson
USA
555454545

while i m getting this output

Mark Robinson<br>
USA<br>
555454545<br>

Any Solution to remove <br> tags and for printing the data same as it was inserted in Database(in paragraph)?

Avoid using nl2br if you dont want to get <br>

nl2br — Inserts HTML line breaks before all newlines in a string

Description

string nl2br ( string $string [, bool $is_xhtml = true ] ) 

Returns string with '<br />' or '<br>' inserted before all newlines ( , , and ).

refer this link http://php.net/manual/en/function.nl2br.php

EDIT

you can encode URL to pass new line as

<a href="whatsapp://send?text=<?php echo urlencode($row['invite']); ?> -:Flash-Downloads.in:-">Share</a>

EDIT

use rawurlencode() to encode whitespace to %20 instead of +

<a href="whatsapp://send?text=<?php echo rawurlencode($row['invite']); ?> -:Flash-Downloads.in:-">Share</a>