strtok() splits a string into smaller strings usually called as tokens, with each token being delimited by any character from token. That is, if you have a string like "This is vijithbk" you could tokenize this string into its small words by using the space character as the token.
$string = "This is vijith";
$tok = strtok($string, " ");
while ($tok !== false)
$tok = strtok($string, " ");
while ($tok !== false)
{
echo "Word=$tok \n";
$tok = strtok(" ");
}
//Outputecho "Word=$tok \n";
$tok = strtok(" ");
}
Word=This Word=is Word=vijith