note 71066 deleted from function.str-replace by philip

From: Date: Mon, 26 Feb 2007 07:02:45 +0000
Subject: note 71066 deleted from function.str-replace by philip
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-123883@lists.php.net to get a copy of this message
Note Submitter: mark0 ---- 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

« previous php.notes (#123883) next »