On 04/02/10 18:58, David Stoltz wrote:
Hi folks,
In ASP, I would commonly replace string line feeds for HTML output like
this:
Var = replace(value,vbcrlf,"")
In PHP, the following doesn't seem to work:
$var = str_replace(chr(13),"\n",$value)
Neither does:
$var = str_replace(chr(10),"\n",$valu
well david actually $var = str_replace(chr(13),"\n",$value) will replace
char(13) with \n... but \n wont come up in html unless u give a tag..
u need to put
$var = str_replace(chr(13),"",$value) in order to got the required
output
Midhun Girish
On Fri, Apr 2, 2010 at 7:03 PM, Ashley Sheri
On Fri, 2010-04-02 at 09:28 -0400, David Stoltz wrote:
> Hi folks,
>
> In ASP, I would commonly replace string line feeds for HTML output like
> this:
>
> Var = replace(value,vbcrlf,"")
>
> In PHP, the following doesn't seem to work:
> $var = str_replace(chr(13),"\n",$value)
>
> Neither do
Hi folks,
In ASP, I would commonly replace string line feeds for HTML output like
this:
Var = replace(value,vbcrlf,"")
In PHP, the following doesn't seem to work:
$var = str_replace(chr(13),"\n",$value)
Neither does:
$var = str_replace(chr(10),"\n",$value)
What am I doing wrong?
Thanks!
4 matches
Mail list logo