note 13565 added to function.ereg.php

From: Date: Thu, 21 Jun 2001 20:28:18 +0000
Subject: note 13565 added to function.ereg.php
Groups: php.notes 
Request: Send a blank email to php-notes+get-14543@lists.php.net to get a copy of this message
with PHP 3.0.12 (I know, old but the client Im working for wont upgrade for some odd reason, dont ask why), I ripped my hair out over a simple little problem: When using ereg(), you cannot use a variable variable as an input string. ex: if (ereg("[ONE|TWO]",${"some var name" . $someothervar})) { did not work at all. Even this doesnt work: $var = ${"somevarname" . $someothervar}; if (ereg("[ONE|TWO]",$var)) { php would not report any error (hell, it didnt respond at all), instead in IE I would get a Page Not Found error, in Netscape I get a "Document has no data" popup. Hope this helps. http://www.php.net/manual/en/function.ereg.php

« previous php.notes (#14543) next »