Re: Script feedback: insert string into another string
| From: | Tijnema ! | Date: | Sat, 28 Apr 2007 14:30:44 +0000 |
| Subject: | Re: Script feedback: insert string into another string | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-254059@lists.php.net to get a copy of this message | ||
On 4/28/07, Micky Hulse <micky@ambiguism.com> wrote:
Tijnema! You rock! Another great catch. :) Tijnema ! wrote: ...<snip>... 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 :) Just updated the code. (Hehe, tis hard to catch those zzZZzz's when my mind is thinking in code.) <http://www.ambiguism.com/sandbox/insert/insert.phps> Has anyone told you that you are a very good beta tester! :D I hope I did it right... Looks like I may still be having the same problems (word count = "2", and separator = "| |": | |Vestibulum urna. <h6>Test | |header</h6> Nam egestas | |rhoncus nisl. Hmmm, going to stare at this code for a bit... Many thanks again for your help -- it really helps having that second pair of eyes. I will post again if I significantly update the code. ;) Thanks Tijnema! I really appreciate your time, help, and expertise. Cheers, MickyWell, i found another thing, it's not really a bug, but you're using eregi, which is a case insensitive function, and you're trying to find a match for A-Z (ABCD...XYZ) and a-z (abcd...xyz), but they are both the same, because you're using an case insensitive function. So you could simplify your code a little bit to remove the double things. Didn't find anymore bugs yet, maybe later... if i find one i'll let you know :) Tijnema