"Ben Duffy" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>
> "Shawn McKenzie" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > I have a var:
> > $test = 'echo \'test\';';
> >
> > If I display this in a textearea like so:
> > echo "<textarea wrap=\"virtual\" rows=\"20\" style=\"width: 100%\"
> > name=\"action\">\n"
> > .$test
> > ."</textarea>\n";
> >
> > In the browser and in the HTML source I see (no slashes):
> > echo 'test';
> >
> > Even if I do an htmlentities($test); I see no slashes and the
> single-quotes
> > are not shown in the HTML source as &quot;
> >
> > Is this just a behavior of the textarea???
> >
> > Thanks!
> > -Shawn
>
> Shawn,
>
> try $test = 'echo \\'test\\';';


Apologies,

try
$test = 'echo \\\'test\\\';';

escaping the slash itself, and escaping the comma..

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to