Re: note 47569 modified in function.str-replace by tularis

From: Date: Sat, 20 Nov 2004 19:56:19 +0000
Subject: Re: note 47569 modified in function.str-replace by tularis
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-80812@lists.php.net to get a copy of this message
I say just delete it. S tularis@php.net wrote:
---[ Editor's Note ]--- This way works, but it's easier to just use nl2br() instead, which supports both \n and \r, whereas this function does not support both. ---[ End Note ]--- This is an easy way to replace the breaks and paragrafs submitted via a Textarea to <br>s in the output. <?Php $test="Teststring test test test test test test"; echo str_replace(Chr(13), "<br>", $test); ?> --was-- This is an easy way to replace the breaks and paragrafs submitted via a Textarea to <br>s in the output. <?Php $test="Teststring test test test test test test"; echo str_replace(Chr(13), "<br>", $test); ?> http://php.net/manual/en/function.str-replace.php


« previous php.notes (#80812) next »