diff --git a/reference/strings/functions/strtok.xml b/reference/strings/functions/strtok.xml index dcfe7b3118..2f6045eceb 100644 --- a/reference/strings/functions/strtok.xml +++ b/reference/strings/functions/strtok.xml @@ -1,5 +1,5 @@ - + @@ -28,7 +28,8 @@ $string = "This is\tan example\nstring"; /* Use tab and newline as tokenizing characters as well */ $tok = strtok($string, " \n\t"); -while ($tok) { + +while ($tok !== false) { echo "Word=$tok
"; $tok = strtok(" \n\t"); } @@ -94,10 +95,7 @@ var_dump($first_token, $second_token); - - Also be careful that your tokens may be equal to "0". This - evaluates to &false; in conditional expressions. - + &return.falseproblem; See also split and explode.