Re: [PHP] Divide into words

2002-12-17 Thread Sean Burlington
how about ... Nope. The question was the position of the words, not how many times they appear. oops :( -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Divide into words

2002-12-16 Thread John W. Holmes
> > For example i have some words: > > > > Today is very beautiful day and sun is shining > > > > What i want to get from this is array > > > > words > > [Today] => 0 > > [Is] => 6,30 > > [Very] => 8 > > [beautiful] => 12 > > .. > > > > Can somebody please help me with this. Those nubers a

Re: [PHP] Divide into words

2002-12-16 Thread Sean Burlington
Uros Gruber wrote: Hi! For example i have some words: Today is very beautiful day and sun is shining What i want to get from this is array words [Today] => 0 [Is] => 6,30 [Very] => 8 [beautiful] => 12 .. Can somebody please help me with this. Those nubers are position of special word

RE: [PHP] Divide into words

2002-12-16 Thread John W. Holmes
onals. Get your copy today. http://www.phparch.com/ > -Original Message- > From: Marco Tabini [mailto:[EMAIL PROTECTED]] > Sent: Monday, December 16, 2002 12:37 PM > To: [EMAIL PROTECTED] > Cc: 'Uros Gruber'; PHP-General > Subject: RE: [PHP] Divide into words >

RE: [PHP] Divide into words

2002-12-16 Thread Marco Tabini
John, I'm not sure this will work if there is more than one space between words. Also, my previous example won't work if there are duplicate words (although it's easy to make an array out of each word and solve the problem), nor if the words are delimited by any character other than spaces, in wh

RE: [PHP] Divide into words

2002-12-16 Thread John W. Holmes
> For example i have some words: > > Today is very beautiful day and sun is shining > > What i want to get from this is array > > words > [Today] => 0 > [Is] => 6,30 > [Very] => 8 > [beautiful] => 12 > .. > > Can somebody please help me with this. Those nubers are > position of special

Re: [PHP] Divide into words

2002-12-16 Thread Marco Tabini
You could use strpos--there are easier ways if you don't need the offsets. Example: This is from memory, but it looks like it should work even for weird strings like the one above. Cheers, Marco -- php|architect - The magazine for PHP Professionals The monthly worldwide magazin