Web page hosting and cheap domain registration register services
 

Sponsers:

 

 

 

Smarty Manual
PrevChapter 5. Variable ModifiersNext

nl2br

All linebreaks will be converted to <br /> tags in the given variable. This is equivalent to the PHP nl2br() function.

Example 5-13. nl2br

<?php

$smarty
= new Smarty;
$smarty->assign('articleTitle', "Sun or rain expected\ntoday, dark tonight");
$smarty->display('index.tpl');

?>

Where index.tpl is:

{$articleTitle|nl2br}

This should output:

Sun or rain expected<br />today, dark tonight

PrevHomeNext
lowerUpregex_replace
 

 

 

 

Search engine submission by Seosubmit.com | Cheap domain by Cheap Domain Registrar  

Disclaimers: This document is provided as free service for the benefits of Active-Venture.com's web hosting customers only.

 
Quotes: So different are the colours of life, as we look forward to the future, or backward to the past; and so different the opinions and sentiments which this contrariety of appearance naturally produces, that the conversation of the old and young ends generally with contempt or pity on either side.