note 71066 added to function.str-replace
| From: | mark0 at osu1 dot php dot net | Date: | Fri, 10 Nov 2006 12:33:15 +0000 |
| Subject: | note 71066 added to function.str-replace | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-119583@lists.php.net to get a copy of this message | ||
I use this to invert a math formula.
$testFormula = "(a+2-3*i)/2";
$op =
array("+","-","*","/","++","--","**","//");
$iop =
array("++","--","**","//","-","+","/","*");
print($testFormula ." => ".str_replace($op,$iop,$testFormula ));
Output will be :
(a+2-3*i)/2 => (a-2+3/i)*2
----
Server IP: 66.163.161.117
Probable Submitter: 85.186.81.26 (proxied: 192.168.0.50)
----
Manual Page -- http://www.php.net/manual/en/function.str-replace.php
Edit -- https://master.php.net/note/edit/71066
Del: integrated -- https://master.php.net/note/delete/71066/integrated
Del: useless -- https://master.php.net/note/delete/71066/useless
Del: bad code -- https://master.php.net/note/delete/71066/bad+code
Del: spam -- https://master.php.net/note/delete/71066/spam
Del: non-english -- https://master.php.net/note/delete/71066/non-english
Del: in docs -- https://master.php.net/note/delete/71066/in+docs
Del: other reasons-- https://master.php.net/note/delete/71066
Reject -- https://master.php.net/note/reject/71066
Search -- https://master.php.net/manage/user-notes.php