strtr.php : strstr « String « PHP






strtr.php

 
<?php
   $table = array("<b>" => "<strong>", "</b>" => "</strong>");
   $html = "<b>Today</b>";
   echo strtr($html, $table);
?>
  
  








Related examples in the same category

1.string strstr ( string haystack, string needle ) finds the first occurrence of a substring inside another string (parameter one)
2.strstr function demo
3.strstr() function returns the remainder of string beginning at the first occurrence.
4.strstr.php
5.strtr() function converts all characters contained in destination to their corresponding character matches in source.