Problem with a regex!

From: Date: Sun, 28 Jan 2001 01:17:09 +0000
Subject: Problem with a regex!
Groups: php.general 
Request: Send a blank email to php-general+get-37065@lists.php.net to get a copy of this message
I'm trying to create a small template parser so I can fill my html pages up with data. An example: <html><head><title>{title}</title></head></html What I'm trying to do is run through it and replace {title} with an appropriate value. I have tried running ereg_replace("{$var}",$value,$string) and ereg_replace("\{$var\}",$value,$string). Neither work. They either do nothing or produce the error "Warning: invalid content of \{\}". Any help would be appreciated, Zack _____________________________________________________________ Free email provided by ---> http://sect0r.com

« previous php.general (#37065) next »