note 72662 deleted from function.str-replace by philip

From: Date: Mon, 26 Feb 2007 07:02:54 +0000
Subject: note 72662 deleted from function.str-replace by philip
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-123884@lists.php.net to get a copy of this message
Note Submitter: Nicolas ---- @mark0: Why don't you use strtr instead? <?php $testFormula = "(a+2-3*i)/2"; print($testFormula ." => ".strtr($testFormula, "+-*/", "-+/*")); ?> In any case, I don't see the use of "inverting" the formula like that.

« previous php.notes (#123884) next »