Page 1 of 1

Quick Explanation

Posted: Fri Jun 14, 2002 7:29 pm
by abionifade
hi guys,

can anybody tell me in english what this expression is doing?

especially the meaning and use of addslashes, nl2br.

Code: Select all

$filedesc = addslashes(nl2br($filedesc));
Thanks :D

Posted: Sat Jun 15, 2002 2:58 am
by volka
just read the manual
addslashes
nl2br

Code: Select all

<?php
$test = "just a \\test\\\nnew line\n'makes no sense' ";
print($test);
print('<hr/>');
$test = nl2br($test);
print($test);
print('<hr/>');
$test = addslashes($test);
print($test);
?>