note 42312 added to function.ereg
| From: | crimson_icegirlatyahoodotcom at rn2 dot php dot net | Date: | Tue, 11 May 2004 20:09:51 +0000 |
| Subject: | note 42312 added to function.ereg | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-69488@lists.php.net to get a copy of this message | ||
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 .
----
Manual Page -- http://www.php.net/manual/en/function.ereg.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+42312
Delete -- http://master.php.net/manage/user-notes.php?action=delete+42312&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+42312&report=yes
Search -- http://master.php.net/manage/user-notes.php