Mega Code Archive

 
Categories / Php / Strings
 

Strtr() function converts all characters contained in destination to their corresponding character matches in source

Its syntax: string strtr (string string, string source, string destination) <?     $source = array("<title>" => "<h1>", "</title>" => "</h1>");     $string = "<h1>Today In PHP-Powered News</h1>";     print strtr($string, $source); ?>