On 4/28/07, Micky Hulse <micky@xxxxxxxxxxxxx> wrote:
Just FYI, I did some slight upgrades/updates to the code... Seems to be working pretty good now. :) <http://www.ambiguism.com/sandbox/insert/insert.php> Thanks again Tijnema! Cheers, Micky
I think i found another problem in your script, when i set the word count to 2, with your example test, at some point there is this: (separator = || ) ||Vestibulum urna. <h6>Test ||header</h6> Nam egestas ||rhoncus nisl. This occurs because you count a word starting with < not as a word, but since there's no space between > and Test, Test isn't recognized as a word either. So you should want to use strip_tags on every word, but only on inside the eregi function. So like this: if(eregi('[0-9A-Za-zÀ-ÖØ-öø-ÿ]', $array[$i])) { becomes: if(eregi('[0-9A-Za-zÀ-ÖØ-öø-ÿ]', strip_tags($array[$i]))) { That would fix it :) Tijnema -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php