Dividing a String into Tokens with strtok() : String Token : String PHP Source Code


PHP Source Code » String » String Token »

 

Dividing a String into Tokens with strtok()



<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>

           
       



HTML code for linking to this page:

Follow Navioo On Twitter

PHP Source Code

 Navioo String
» String Token