preg_replace Function in PHP
I'm using preg_replace function to remove a list of stop words. Currently,
I have an array containing a lst of stop words. As the parameter for
preg_replace I use this as the first argument (i.e,
preg_replace(^$stopwordlist$, '',$string) As you can see I'm also using ^$
as I need to match word exactly.However I'm getting the following error
syntax error, unexpected '^', expecting ')' in
Thanks
No comments:
Post a Comment