nlopess Sun May 8 04:43:36 2005 EDT
Modified files: /phpdoc/en/reference/strings/functions strtok.xml Log: explain the === problem and clarify the 1st example. cleaning user notes.. http://cvs.php.net/diff.php/phpdoc/en/reference/strings/functions/strtok.xml?r1=1.5&r2=1.6&ty=u Index: phpdoc/en/reference/strings/functions/strtok.xml diff -u phpdoc/en/reference/strings/functions/strtok.xml:1.5 phpdoc/en/reference/strings/functions/strtok.xml:1.6 --- phpdoc/en/reference/strings/functions/strtok.xml:1.5 Wed Aug 18 10:15:20 2004 +++ phpdoc/en/reference/strings/functions/strtok.xml Sun May 8 04:43:35 2005 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.5 $ --> +<!-- $Revision: 1.6 $ --> <!-- splitted from ./en/functions/strings.xml, last change in rev 1.2 --> <refentry id="function.strtok"> <refnamediv> @@ -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<br />"; $tok = strtok(" \n\t"); } @@ -94,10 +95,7 @@ </screen> </example> </para> - <para> - Also be careful that your tokens may be equal to "0". This - evaluates to &false; in conditional expressions. - </para> + &return.falseproblem; <para> See also <function>split</function> and <function>explode</function>.