note 50863 added to function.chr
| From: | mike at go dot online dot pt | Date: | Fri, 11 Mar 2005 20:18:25 +0000 |
| Subject: | note 50863 added to function.chr | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-86295@lists.php.net to get a copy of this message | ||
In addition to what mcusack wrote about new lines in text files under Windows:
<?php
$text = "First line\r\n";
$text .= "Second line";
echo $text;
?>
Will output:
First lineSecond line
<?php
$text = "First line" . chr(13) . chr(10);
$text .= "Second line";
echo $text;
?>
Will output:
First line
Second line
----
Manual Page -- http://www.php.net/manual/en/function.chr.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+50863
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+50863&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+50863&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+50863&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+50863&report=yes&reason=useless
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+50863&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+50863&report=yes
Search -- http://master.php.net/manage/user-notes.php