jakebur01 Posted April 16, 2007 Share Posted April 16, 2007 I am getting a PHP Fatal error: Call to undefined function n12br(). Is their another function close to this that will take a string as a parameter and replace all the newlines in it with the xhtml <br /> tag or the <br> tag? Example: $mailcontent = 'Customer name: '.$name."\n" .'Customer email: '.$email."\n" ."Customer comments: \n".$feedback."\n"; <p><?php echo n12br($mailcontent); ?></p> Quote Link to comment https://forums.phpfreaks.com/topic/47268-solved-n12br/ Share on other sites More sharing options...
trq Posted April 16, 2007 Share Posted April 16, 2007 <p><?php echo nl2br($mailcontent); ?></p> Its nL .... And it doesn't replace newlines with <br /> merely appends a <br /> to a newline. Quote Link to comment https://forums.phpfreaks.com/topic/47268-solved-n12br/#findComment-230539 Share on other sites More sharing options...
boo_lolly Posted April 16, 2007 Share Posted April 16, 2007 http://us.php.net/manual/en/function.nl2br.php it's an 'l' as in LION not a '1'. EDIT: beat me to it! =) Quote Link to comment https://forums.phpfreaks.com/topic/47268-solved-n12br/#findComment-230543 Share on other sites More sharing options...
jakebur01 Posted April 16, 2007 Author Share Posted April 16, 2007 Ok I got it now. Thank you soo much. `Jake Quote Link to comment https://forums.phpfreaks.com/topic/47268-solved-n12br/#findComment-230550 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.