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> 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. 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! =) 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 Link to comment https://forums.phpfreaks.com/topic/47268-solved-n12br/#findComment-230550 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.