mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-15 16:38:54 +00:00
explain the === problem and clarify the 1st example. cleaning user notes..
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@186006 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
c4aac32a94
commit
f050fd9b83
1 changed files with 4 additions and 6 deletions
|
@ -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 @@ var_dump($first_token, $second_token);
|
|||
</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>.
|
||||
|
|
Loading…
Reference in a new issue