PHP strtok() Function

PHP strstr() Function
PHP strtolower() Function

what is the syntax of the STRTOK() function in php?

strtok(string,split)
ParameterDescription
stringRequired. Specifies the string to split
splitRequired. Specifies one or more split characters
PHP STRTOK() method

examples of the STRTOK() function

Example 1. In this example, we split string one by one.

<?php
$string = "Hello world. Beautiful day today.";
$token = strtok($string, " ");

while ($token !== false)
{
echo "$token<br>";
$token = strtok(" ");
}
?>
PHP strstr() Function
PHP strtolower() Function

Stay up-to-date about PHP!

We don’t spam!

en English
X
Scroll to Top