PHP Program to remove special characters from a string using str_replace()
<?php
#string
$str= 'We, welcome all of you, to our school <of PHP>.
This--> school is one of its kind :).
Many schools dont offer this subject :(';
$str = str_replace( array( '\'', '(',')', ',' , ':', '<', '>','.',' ','-' ), '',$str);
// Printing the result
echo $str;
?>
Output
WewelcomeallofyoutoourschoolofPHP
Thisschoolisoneofitskind
Manyschoolsdontofferthissubject
