Re: [PHP] strtok()

2002-06-10 Thread Justin French
I *think* it's because you don't have an { at the beginning of the while() loop "; while ($token!="") { $token=strtok(" "); echo $token.""; } ?> Or, use the example in the manual as a guide: "; $tok = strtok(""); } ?> Justin on 11/06/02 1:58 PM, Anthony Ritter

Re: [PHP] strtok()

2002-06-10 Thread Anthony Ritter
Thank you. The output is t o n y One thing...the server seem to keep running after the output to the browser like it's going through an indefinate loop. Any throughts? TR -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] strtok()

2002-06-10 Thread Justin French
you're trying to split it on a space (" ")... there are no spaces in "tony". "my name is tony" would prolly output my name is tony You could try splitting on "" (nothing), or use a different function which places a after each character. Justin on 11/06/02 1:34 PM, Anthony Ritter ([EMAI

[PHP] strtok()

2002-06-10 Thread Anthony Ritter
Trying to test the function strtok() I thought that the following script would output: t o n y but I get tony Thanking all in advance. Tony Ritter . "; while ($token!="") $token=strtok(" "); echo $token.""; } ?> -- PHP General Maili

Re: [PHP] strtok bug

2002-01-13 Thread Philip Olson
Are you referring to the change with 4.1.0 that's documented in the manual? Have another look, it gives examples of new/old behavior: http://www.php.net/strtok Regards, Philip Olson On Sun, 13 Jan 2002, Robert Mena wrote: > Hi, does anybody know when the strtok bug introduced > in 4.1.1 wi

[PHP] strtok bug

2002-01-13 Thread Robert Mena
Hi, does anybody know when the strtok bug introduced in 4.1.1 will be fixed ? Will we have a 4.1.2 or should I try to grab a cvs tree (assuming that it is already solved) ? thanks. __ Do You Yahoo!? Send FREE video emails in Yahoo! Mail! http://pro

[PHP] strtok not working...

2001-04-22 Thread Christian Dechery
I have a chunk of text like this: $string="bla bla bla (12837) ble blo bli sjhs9 39udjkd"; I only want "bla bla bla" out of it... what is wrong with: $newString = strtok ($string,"(128"); altough this seems to work: $newStrArray = explode("(128",$string); so $newStrArray[0] would have exactly