♠ ♠
♣ ♣
♥ ♥ etc.
You can remove this using preg_replace function of php
$name="Sandeep♠ Singh♣ Bisht♥";
$name = preg_replace('/[^(\x20-\x7F)]*/','', $name);
echo $name;
Your input is : Sandeep♠ Singh♣ Bisht♥
And the output is :Sandeep Singh Bisht
For more reference:
http://www.stemkoski.com/php-remove-non-ascii-characters-from-a-string/
No comments:
Post a Comment