View Single Post
  #2 (permalink)  
Old 07-31-2008, 06:20 AM
curtiss's Avatar
curtiss curtiss is offline
Moderator
 
Join Date: May 2003
Posts: 1,468
My first guess would be that $keyword is not really an array, but a string.

If you use a string in a scalar context (place a number in square brackets after the string name), it will use one letter from the string.

I do find it a bit strange that you're running the loop according to the count of a variable called "$bigWords", but you're utilizing a variable called $keyword inside.

Finally, unless your keyword will include a regexp at any point in time, you really should be using str_ireplace instead of preg_replace.
__________________
I hate Internet Explorer! Anyone with me?
Reply With Quote