<html> <head> <title>Dividing a string into tokens with strtok()</title> </head> <body> <?php $test = "http://www.navioo.com/qs.xp?OP=dnquery.xp&ST=MS&DBS=2&QRY=developer+php"; $delims = "?&"; $word = strtok( $test, $delims ); while ( is_string( $word ) ) { if ( $word ){ print "$word<br>"; } $word = strtok( $delims); } ?> </body> </html>
|