Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

Remove Special Character in PHP

phpCopy<?php
$mainstr = "This is a sim'ple text;";
echo "Text before remove: 
" . $mainstr, "
";
$replacestr = remove_sp_chr($mainstr);
function remove_sp_chr($str)
{
    $result = str_replace(array("#", "'", ";"), '', $str);
    echo "

Text after remove: 
" . $result;
}
?>
Source by www.delftstack.com #
 
PREVIOUS NEXT
Tagged: #Remove #Special #Character #PHP
ADD COMMENT
Topic
Name
1+2 =