Table of contents Home page
$replacement_table = array('-' => '‐', '\'' =gt; '’'); $s = 'De co-auteur had nooit eerder aan zo\'n boek gewerkt.'; echo strtr($s, $replacement_table), '\n'; // Replace the ASCII hyphen and apostrophe with theit typographical equivalents
$s = 'number-of-people = 3,000'; echo strtr($s, '-,', '_.'), '\n'; // Note that this form of the function can only replace single bytes