> From: Erik Price <[EMAIL PROTECTED]> > Date: Tue, 18 Mar 2003 16:57:57 -0500 > > The only tokenizers I have used are the StringTokenizer and > StreamTokenizer classes in Java. If you want to learn about these, go > to this web page: http://www.mindview.net/Books/TIJ/ and download the > book "Thinking in Java". Chapter 9 is the chapter that covers File I/O > and discusses how to use them. I have a feeling that the PHP tokenizers > work very similarly to the Java one (just judging from the docs on the > PHP site).
Just peeked at the strtok() function in PHP manual ... and the only real difference from Java seems to be how the tokenizer is initialized, and how to get the next token. Another method is the one I use in VB (which don't have a tokenizer function): Split the entire text into an array, then count the number of elements in the array (but be warned: A text file in array causes a massive memory drain). I do this is in all my VB programs to deal with file paths ... in VB there's simply no simpler to construct entire folder trees that don't exist... Rene -- Rene Brehmer This message was written on 100% recycled spam. Come see! My brand new site is now online! http://www.metalbunny.net -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php