ereg problems: Warning: Invalid content of...

From: Date: Mon, 05 Jun 2000 17:56:18 +0000
Subject: ereg problems: Warning: Invalid content of...
Groups: php.general 
Request: Send a blank email to php-general+get-1069@lists.php.net to get a copy of this message
In a couple of PHP form handling programs I am trying to use (written by other people), they use {{field_name}} syntax to put the form's field names into the outgoing email templates, etc. However, I get errors like the following: Warning: Invalid content of \{\} in phorm/phorm.php3 on line 754 In both of the form handlers, they use ereg to sort out the {{...}} syntax, like: $pattern = ereg("{{[A-z0-9_]*}}",$var2use[$index]); if ($pattern) { $line = ereg_replace("{{","$",$var2use[$index]); $line = ereg_replace("}}","",$line); } ....etc.... I figure it must be in my setup, since two separate authors' scripts cause the same error. I am using PHP 3.0.16 (details via phpinfo() at freedom.uwc.net/Test/test.php), with Apache on Linux. Is it a problem with Linux? I have Perl-style reg exp's turned on as well. Is that a problem? Suggestions? --Bruce

« previous php.general (#1069) next »