PHP Strtok.Php – String Function

<?php
   $info = "this:is|a,test.";   $tokens = ":|,";
   $tokenized = strtok($info, $tokens);
   while ($tokenized) {
      echo "Element = $tokenized<br />";
      $tokenized = strtok($tokens);
   }
?>

Enjoyed this post? Share it!

 

Leave a comment

Your email address will not be published.