note 20537 rejected from function.ereg-replace by sander
| From: | sander@php.net | Date: | Sun, 07 Apr 2002 10:20:47 +0000 |
| Subject: | note 20537 rejected from function.ereg-replace by sander | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-28802@lists.php.net to get a copy of this message | ||
If you want replace something what contains '$' then the string must contain a backslash
before the '$' sign.
For example to reach this goal:
replace '$blabla' with 'another blabla'
This will not work:
ereg_replace("\$$blabla","another blabla",$mainblabla);
The working solution:
ereg_replace("\\\$$blabla","another blabla",$mainblabla);
Miklos Pathy