admin管理员组文章数量:1414857
;text=Hello%0AHow%20R%20U?
O/P:
I want this output using PHP/JavaScript:
Hello
How R U?
I have a already try encodeURI JS, urlencode PHP, \n, br html, nltobr, \r\n, etc,...
But it did't worked.
https://api.whatsapp./send?phone=XXXXXXXXXX&text=Hello%0AHow%20R%20U?
O/P:
I want this output using PHP/JavaScript:
Hello
How R U?
I have a already try encodeURI JS, urlencode PHP, \n, br html, nltobr, \r\n, etc,...
But it did't worked.
Share Improve this question edited Feb 25, 2019 at 5:42 Nick Parsons 51.2k6 gold badges57 silver badges78 bronze badges asked Feb 25, 2019 at 5:34 WO DevelopersWO Developers 3332 gold badges5 silver badges13 bronze badges 1- Hi! This link of api works? Have price for use? Limit messages per day? – Cristian Budzicz Commented May 3, 2020 at 12:33
2 Answers
Reset to default 1you have to encodeURI first:-
var whatsappMessage= "My First"+"\r\n\r\n"+"Message for Test";
whatsappMessage = window.encodeURIComponent(whatsappMessage);
Sending encoded message as parameter like :-
send?text=whatsappMessage
- In PHP, for whatsapp message, to have line break, no javascript required:
$message = 'Hello'. urlencode("\n"). 'How R U?';
- Or create a variable to be used on any line:
$break = urlencode("\n");
本文标签: How to send new line whatsapp message using PHPJavaScriptStack Overflow
版权声明:本文标题:How to send new line whatsapp message using PHPJavaScript? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745202024a2647429.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论