'How do we remove just the "+" sign from mobile number , [closed]
I am collecting mobile number in a registration form with +919xxxx. But for sending SMS through API my SMS provider don't allow + prefix instead they allow country code with mobile number So for this instance alone I need to remove the + prefix and Post mobile number in API string so which code I should use in PHP ?
Any advice greatly appreciated
Solution 1:[1]
you can use this code it will work and remove "+" from your number
$str = "+912789635241";
$remove = trim($str,"+");
echo $remove;
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 |
