Re: Replacing newlines (\n) with smething else
| From: | David Otton | Date: | Sun, 13 Jul 2003 21:45:27 +0000 |
| Subject: | Re: Replacing newlines (\n) with smething else | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-155025@lists.php.net to get a copy of this message | ||
On 13 Jul 2003 17:27:04 -0400, you wrote:
>Perhaps. When getting text from a form field, what is substituted for a
>newline (i.e. when someone hits enter).
You can work it out for yourself. Run over the string, displaying each
character as it's ASCII equivalent with ord(). Eg
for ($i = 0; $i < strlen($article); $i++) {
echo ("'" . $article[$i] . "'=" . ord($article[$i]) . ',
');
}
(My guess is that you're seeing the difference between a wrapped line and
the user explicitly hitting enter)