note 97439 added to function.strtr
| From: | elloromtz at gmail dot com | Date: | Tue, 20 Apr 2010 00:08:56 +0000 |
| Subject: | note 97439 added to function.strtr | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-168434@lists.php.net to get a copy of this message | ||
If you supply 3 arguments and the 2nd is an array, strtr will search the "A" from
"Array" (because you're treating it as a scalar string) and replace it with the 3rd
argument:
strtr('Analogy', array('x'=>'y'), '_');
//'_nalogy'
so in reality the above code has the same affect as:
strtr('Analogy', 'A' , '_');
----
Server IP: 192.41.40.227
Probable Submitter: 98.198.217.142
----
Manual Page -- http://www.php.net/manual/en/function.strtr.php
Edit -- https://master.php.net/note/edit/97439
Del: integrated -- https://master.php.net/note/delete/97439/integrated
Del: useless -- https://master.php.net/note/delete/97439/useless
Del: bad code -- https://master.php.net/note/delete/97439/bad+code
Del: spam -- https://master.php.net/note/delete/97439/spam
Del: non-english -- https://master.php.net/note/delete/97439/non-english
Del: in docs -- https://master.php.net/note/delete/97439/in+docs
Del: other reasons-- https://master.php.net/note/delete/97439
Reject -- https://master.php.net/note/reject/97439
Search -- https://master.php.net/manage/user-notes.php