preg_match works, eregi doesn't
Posted: Tue Jun 25, 2002 10:28 pm
The following code works great:
and the following doesn't work at all:
Why would that be?
Code: Select all
if (preg_match ("/php/i", "PHP is the web scripting language of choice.")) {
print "A match was found.";
} else {
print "A match was not found.";
}Code: Select all
if (eregi ("/php/i", "PHP is the web scripting language of choice.")) {
print "A match was found.";
} else {
print "A match was not found.";
}