Quick Explanation

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
abionifade
Forum Commoner
Posts: 34
Joined: Thu Apr 18, 2002 5:32 pm

Quick Explanation

Post 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
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post 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);
?>
Post Reply