note 61842 deleted from function.func-get-arg by nlopess

From: Date: Mon, 13 Feb 2006 17:44:54 +0000
Subject: note 61842 deleted from function.func-get-arg by nlopess
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-103634@lists.php.net to get a copy of this message
Note Submitter: moe at moestaverne dot com ---- i made a str_replace function, which you can give more than just 1 pair of strings: function str_replace_m() { $i = func_num_args()-1; if ($i%2 > 0 || $i <= 0) { return false; } $args=func_get_args(); $string = $args[0]; for($a=1;$a<=$i+1;$a++) { $string = str_replace($args[$a],$args[$a+1],$string); $a++; } return $string; }

« previous php.notes (#103634) next »