Created
December 20, 2022 10:36
-
-
Save rmak78/4ba9fc35d06bfe56cb2be74e74118df0 to your computer and use it in GitHub Desktop.
How to send Whatsapp Messages with line breaks etc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//https://wa.me/+99123456789?text=Line%0aBreak | |
//The %0a represents the line break | |
$message = urlencode("**NEW ORDER**")."%0a"; | |
$message .= urlencode("ProductID : $product_id")."%0a"; | |
$message .= urlencode("Product Name : *$product_name*")."%0a"; | |
$message .= urlencode("***************")."%0a"; | |
$message .= urlencode("Customer Name : *$name*")."%0a"; | |
$message .= urlencode("Customer Phone : *$phone*")."%0a"; | |
$message .= urlencode("Customer Address : $address")."%0a"; | |
$message .= urlencode("*****************")."%0a"; | |
$message .= urlencode("Ref: http://$ref_link")."%0a"; | |
echo "<script> | |
location.href= 'https://wa.me/+923008813455?text=$message' | |
</script>"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment