Re: [PHP] Script feedback: insert string into another string

2007-05-03 Thread Tijnema !
I owe you and Tijnema a beer! Have a great day/night! Cheers, Micky I'm sorry, you have to wait another 9 months, because only than i can legally drink a beer :) (than i will be > 16 :) ) Tijnema -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsu

Re: [PHP] Script feedback: insert string into another string

2007-05-03 Thread Micky Hulse
Hi Richard, thanks again for the detailed reply, I really appreciate you help. Richard Lynch wrote: Counting words is almost always a Bad Idea, since you may have users who use big fat words (University professors and Market-speak) and you have have texters who, like, don't even use words... u

Re: [PHP] Script feedback: insert string into another string

2007-05-03 Thread Richard Lynch
On Wed, May 2, 2007 6:36 pm, Micky Hulse wrote: > 1. wordwrap() is a little different than the function I wrote because > it > counts characters only... I need to count words. I am sure wordwrap > could be modified to count words, but I have yet to really explore > this > option. Counting words is

Re: [PHP] Script feedback: insert string into another string

2007-05-02 Thread Micky Hulse
Hi Richard! Thanks again for your help on this one. ;) Richard Lynch wrote: These are from some non-PHP session/cookie management setup, I believe. Ahhh, very interesting! Thanks for the clarification. :) Call me paranoid. Better that than spammed! :D PS Still haven't figured out why you

Re: [PHP] Script feedback: insert string into another string

2007-05-02 Thread Micky Hulse
Hey Richard! Thanks for the reply. I was hoping someone would re-visit my questions. Richard Lynch wrote: I can GUARANTEE that PHP's wordwrap did NOT issue those cookies. Oh, for sure. I understand that. I guess what I was trying to say/ask was this: 1. wordwrap() is a little different than

Re: [PHP] Script feedback: insert string into another string

2007-05-02 Thread Richard Lynch
On Sat, April 28, 2007 5:31 pm, Micky Hulse wrote: > Brad Sumrall wrote: >> But! >> I am now noticing that the main page provides cookies called >> _utma >> _utmb >> _utmc >> _utmz >> >> Hmmm > > Wha? Never thought of that. > > It looks like wordwrap() may not be what I am looking for (

RE: [PHP] Script feedback: insert string into another string

2007-05-02 Thread Richard Lynch
On Sat, April 28, 2007 5:10 pm, Brad Sumrall wrote: > But! > I am now noticing that the main page provides cookies called > _utma > _utmb > _utmc > _utmz > > Hmmm Actually, they each have an extra underscore on front, I think. __utma etc. These are from some non-PHP session/cookie

Re: [PHP] Script feedback: insert string into another string

2007-04-28 Thread Micky Hulse
Micky Hulse wrote: Allowing cookies sounds like a security hole... Any suggestions for beefing-up my security would be spectacular! :) Ahhh, would that have anything to do with XSS? I thought striptags() would take care of such problems

Re: [PHP] Script feedback: insert string into another string

2007-04-28 Thread Micky Hulse
Brad Sumrall wrote: But! I am now noticing that the main page provides cookies called _utma _utmb _utmc _utmz Hmmm Wha? Never thought of that. It looks like wordwrap() may not be what I am looking for (though, still researching)... Either way, I am curious to hear what you would

Re: [PHP] Script feedback: insert string into another string

2007-04-28 Thread Micky Hulse
Micky Hulse wrote: Shux. I have a feeling that, with the help of Tijnema, I just re-invented wheel. Wait! wordwrap() default behaviour is to count characters, not words. "wordwrap — Wraps a string to a given number of characters using a string break character" I think that is why I initiall

RE: [PHP] Script feedback: insert string into another string

2007-04-28 Thread Brad Sumrall
But! I am now noticing that the main page provides cookies called _utma _utmb _utmc _utmz Hmmm Brad -Original Message- From: Richard Lynch [mailto:[EMAIL PROTECTED] Sent: Saturday, April 28, 2007 3:48 PM To: [EMAIL PROTECTED] Cc: php php Subject: Re: [PHP] Script feedback

Re: [PHP] Script feedback: insert string into another string

2007-04-28 Thread Micky Hulse
Tijnema ! wrote: Didn't find anymore bugs yet, maybe later... if i find one i'll let you know :) Thanks again Tijnema! I just read the not from Richard Looks like I might have wasted your time on this one. :( I just woke up... going to test wordwrap() You know, I saw that in the manual

Re: [PHP] Script feedback: insert string into another string

2007-04-28 Thread Richard Lynch
Without reading source, it sounds like you've just re-invented this: http://php.net/wordwrap :-) On Sat, April 28, 2007 12:32 am, Micky Hulse wrote: > Hi, > > I pieced-together a script that will insert a string into another > string > at a set interval of words... See here: > >

Re: [PHP] Script feedback: insert string into another string

2007-04-28 Thread Tijnema !
On 4/28/07, Micky Hulse <[EMAIL PROTECTED]> wrote: Tijnema! You rock! Another great catch. :) Tijnema ! wrote: > .. > 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

Re: [PHP] Script feedback: insert string into another string

2007-04-28 Thread Micky Hulse
Tijnema! You rock! Another great catch. :) Tijnema ! wrote: .. 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 z

Re: [PHP] Script feedback: insert string into another string

2007-04-28 Thread Tijnema !
On 4/28/07, Micky Hulse <[EMAIL PROTECTED]> wrote: Just FYI, I did some slight upgrades/updates to the code... Seems to be working pretty good now. :) Thanks again Tijnema! Cheers, Micky I think i found another problem in your script, whe

Re: [PHP] Script feedback: insert string into another string

2007-04-28 Thread Micky Hulse
Just FYI, I did some slight upgrades/updates to the code... Seems to be working pretty good now. :) Thanks again Tijnema! Cheers, Micky -- Wishlists: Switch: BCC?:

Re: [PHP] Script feedback: insert string into another string

2007-04-28 Thread Micky Hulse
Tijnema! Thanks for the quick reply! I really really really appreciate the help. :D Tijnema ! wrote: Nice idea, but it seems that it isn't working correctly. I did this example: With your break_up function. It results this: .. While i expected this: .. Ahh! Great way to test thi

Re: [PHP] Script feedback: insert string into another string

2007-04-28 Thread Tijnema !
On 4/28/07, Micky Hulse <[EMAIL PROTECTED]> wrote: Hi, I pieced-together a script that will insert a string into another string at a set interval of words... See here: [Click the "view source" link to view source.] :D Basically, I need