Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

Remove Special Character in PHP

phpCopy<?php
function RemoveSpecialChar($str)
{
    $res = preg_replace('/[0-9@.;" "]+/', '', $str);
    return $res;
}
$str = "My name is  hello and email hello.world598@gmail.com;";
$str1 = RemoveSpecialChar($str);
echo "My UpdatedString: ", $str1;
?>
Source by www.delftstack.com #
 
PREVIOUS NEXT
Tagged: #Remove #Special #Character #PHP
ADD COMMENT
Topic
Name
4+9 =