RE: [PHP] Problem with a regex!

From: Date: Sun, 28 Jan 2001 01:36:29 +0000
Subject: RE: [PHP] Problem with a regex!
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-37069@lists.php.net to get a copy of this message
what's the value of var? It appears that it doesn't have a value set. -Jonathan -----Original Message----- From: Zack Ham [mailto:hamoe@sect0r.com] Sent: Saturday, January 27, 2001 5:17 PM To: php-general@lists.php.net Subject: [PHP] Problem with a regex! 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 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#37069) next »