Hi,
Here is a function which will replace all special character from a string.
We can write a regx to check all character number ,space and – , and we can replace everything with –
[^A-Za-z0-9\- ]
Below is sample for how to replace all special character from a string using regx
$variable = "word"; preg_replace('/[^A-Za-z0-9\- ]/', '-', $variable);
Hope it will help some one
6,462 total views, 1 views today
August 30, 2015 at 11:34 pm
Yes! Finally someone writes about quest bars.
August 31, 2015 at 1:45 pm
I enjoy what you guys are usually up too. Such
clever work and exposure! Keep up the great works guys
I’ve incorporated you guys to our blogroll.
September 10, 2015 at 8:51 am
I appreciate, result in I found exactly what I used to be having a look for.
You have ended my 4 day long hunt! God Bless you man. Have a nice day.
Bye
October 14, 2015 at 6:45 pm
Great post however , I was wanting to know if you could write a litte more on this topic?
I’d be very grateful if you could elaborate a little bit further.
Cheers!
February 18, 2017 at 8:57 pm
Im obliged for the article.Really thank you! Awesome.
February 21, 2017 at 1:50 pm
A big thank you for your post. Fantastic.