note 42312 rejected from function.ereg by tomsommer
| From: | tomsommer@php.net | Date: | Tue, 11 May 2004 20:54:50 +0000 |
| Subject: | note 42312 rejected from function.ereg by tomsommer | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-69491@lists.php.net to get a copy of this message | ||
Note Submitter: crimson _ icegirl at yahoo dot com
----
Have been looking for a way to use variables instead of directly having to specify the characters or
string to be checked for .
what i mean is:
if
$a ='a';
$b ='b';
then
ereg(($a$b),$some_string,reg[])
should look for 'a' or 'b' in $some_string.
is it possible? i need it to be able to use words retrieved from the database in the patterns. I
know '$' signifies the end of the string. i'm hoping mebbe there's another way
of referencing the variable inside he pattern string .