Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- preg_replace function doesn't work. HELP!
- Ruslan V. Sulakov
July 6, 2005, 3:15 pm
rate this thread
root@oasis2# cat test.php ; echo "---------"; php test.php
$string = 'April 15, 2003';
$pattern = '/(\w+) (\d+), (\d+)/i';
$replacement = '1,$3';
echo preg_replace($pattern, $replacement, $string);
PHP Fatal error: Call to undefined function: preg_replace() in
/home/ruslan/oasis/oasis/test.php on line 6
Any help is apriciated!
Thanks in advance!
Re: preg_replace function doesn't work. HELP!
Did you compile it yourself?
Maybe you forgot the PCRE extensions??
If so: recompile php and compile the regular expression engine into it.
And when you are busy doing, why not take a newer version?