1//replaces every occurence of $search with $replace in the string $subject
2str_replace ($search, $replace, $subject);
1$vowels = array("a", "e", "i", "o", "u", "A", "E", "I", "O", "U");
2$onlyconsonants = str_replace($vowels, "", "Hello World of PHP");
3// Fornece: Hll Wrld f PHP
1<?php
2$string = str_ireplace("FoX", "CAT", "the quick brown fox jumps over the lazy dog");
3echo $string; // the quick brown CAT jumps over the lazy dog
4?>