note 42963 added to function.strtr

From: Date: Fri, 04 Jun 2004 20:59:13 +0000
Subject: note 42963 added to function.strtr
Groups: php.notes 
Request: Send a blank email to php-notes+get-70673@lists.php.net to get a copy of this message
Hi, before I found strtr() function I quickly wrote own repleacement, if someone is interested, // by http://www.raf256.com - Rafal Maj function ConvCharset($from,$to,$s) { $l=strlen($s); $S=''; // out put for ($i=0; $i<$l; $i++) { $c=$s[$i]; // curr char $x=strpos($from, $c); if ($x!==FALSE) $c=$to[$x]; $S.=$c; } return $S; } ---- Manual Page -- http://www.php.net/manual/en/function.strtr.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+42963 Delete -- http://master.php.net/manage/user-notes.php?action=delete+42963&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+42963&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#70673) next »