note 39180 added to language.operators.increment
| From: | jlladono at pie dot xtec dot es | Date: | Tue, 20 Jan 2004 00:06:15 +0000 |
| Subject: | note 39180 added to language.operators.increment | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-63852@lists.php.net to get a copy of this message | ||
If you want to read a number from a text file (with fgets(), for example), you can get a string with
appended newline character.
An example with a string formed by '7' and newline char:
$x="7\n";
$x++; // it doesn't work to get an 8. $x keeps same value
$x = $x +1; // it works to get an 8.
That was under linux (text files with \n and not \n\r at line ends). If anyone wants to try in
windows...
----
Manual Page -- http://www.php.net/manual/en/language.operators.increment.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+39180
Delete -- http://master.php.net/manage/user-notes.php?action=delete+39180&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+39180&report=yes
Search -- http://master.php.net/manage/user-notes.php