I have this string to be encoded (with line break)
Sender ID
Sender ID
Sender ID
When using this urlencode generator, I get the desired output which is
Sender%20ID%0ASender%20ID%0ASender%20ID
However when i using php urlencode() i get this output
Sender+ID%0D%0ASender+ID%0D%0ASender+ID
When using the php rawurlencode() i get this output
Sender%20ID%0D%0ASender%20ID%0D%0ASender%20ID
How to achieve the output same as the generator? I need it to be same since Blackberry phone will properly show line break only if the urlencode for line break is %0A (i am working on a sms system).
Right now the only solution i can think is to search for the %0D%0A and replace with %0A
%0D%0Ais\r\n. Dostr_replace("\r\n","\n",$string).