Page 1 of 1

ereg won't work !

Posted: Thu Jun 13, 2002 5:41 am
by Worrel
The following ereg function won't produce anything. My browser keeps waiting for data for more than 15 minutes ...
If I take "this is a testtext" as $text then it finishes in about a sec, so what's wrong ?

Code: Select all

$text = "testtext ";
$regex = "їa]";
$n = ereg($regex, $text);
echo ($n);
rya,
Worrel

Posted: Thu Jun 13, 2002 5:51 am
by Worrel
D'uh !
last line should read:

Code: Select all

if ($n) {
  echo ($n);
} else {
  echo "not found";
}
but thx for reading anyway,
Worrel