note 40902 modified in function.str-replace by aidan
| From: | aidan@php.net | Date: | Sat, 26 Jun 2004 14:22:43 +0000 |
| Subject: | note 40902 modified in function.str-replace by aidan | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-71778@lists.php.net to get a copy of this message | ||
As the manual clearly states, it is only after PHP 4.0.5 that every parameter in str_replace() can
be an array.
However you can use this function with arrays:
<?php
str_replace($array1,$array2,$dest)
?>
Before 4.0.5 and str_replace will silently do nothing.
--was--
if backwards compatibility is not an issue, disregard this comment.
As the manual clearly states, it is only after PHP 4.0.5 that every parameter in str_replace() can
be an array. However you can use this function with arrays str_replace($array1,$array2,$dest) before
4.0.5 and str_replace will silently do nothing.
Calin
http://php.net/manual/en/function.str-replace.php