Reputation: 2336
i am working on sms application with twilio api, i faced a problem about sms formatting
1) a string " i'm here" in php this is going like this in sms body i\'m here
i dont want that slash to come up in sms
2) i want to add line break in message how can i do that.
like this Name age phone Simer 23 2546181541 Mark 25 3521447821
Upvotes: 1
Views: 3398
Reputation: 2336
reply by Twilio staff:
If anyone else needs newlines, make sure your PHP strings are double quoted instead of single quoted and the \n will work: http://php.net/manual/en/language.types.string.php
Upvotes: 4
Reputation: 917
In PHP there's a Magic Quotes option that (while deprecated now) escapes certain characters in a POSTs and GETs. You may be suffering from that.
Upvotes: 0