preg_replace Q
| From: | Cynic | Date: | Thu, 20 Apr 2000 14:00:26 +0000 |
| Subject: | preg_replace Q | ||
| Groups: | php.version4 | ||
| Request: | Send a blank email to php-version4+get-13785@lists.php.net to get a copy of this message | ||
$output = preg_replace( "/\$(\w+)/" , "/\$GLOBALS['\\1']/" , $output )
;
I need to replace $var with $GLOBALS['var'], however the regexp above
doesn't work. What am I doing wrong?
____________________________________________________________
Cynic:
A member of a group of ancient Greek philosophers who taught
that virtue constitutes happiness and that self control is
the essential part of virtue.
cynic@mail.cz
ICQ: 2808 2505