Get Smarty

Donate

Donate Bitcoin Bitcoin
Paypal

Smarty Icon

You may use the Smarty logo according to the trademark notice.

Smarty Template Engine Smarty Template Engine

For sponsorship, advertising, news or other inquiries, contact us at:

Sites Using Smarty

Buy cheap glasses from Cheapglasses123.com and save up to 80%.

Where to buy prescription glasses? GlassesPeople.com is your best choice!

Where to buy discount wedding dresses and cheap smart dresses free shipping - Weddingdresstrend.com

Brautkleider auf Topwedding.de

Buy New Arrival Cheap Prom Dresses 2015 at JDBRIDAL Prom Dress Store

Find Wedding Dresses Online at Canada from Ca-dresses.com

Advertisement

indent

Posizione del Parametro Tipo Obbligatorio Default Descrizione
1 intero No 4 Stabilisce di quanti caratteri deve essere l'indentazione.
2 stringa No (uno spazio) Questo è il carattere usato per l'indentazione.

Questo modificatore effettua un'indentazione della stringa ad ogni riga, per default di 4 caratteri. Come parametro opzionale si può specificare di quanti caratteri deve essere l'indentazione. Si può indicare anche, come secondo parametro opzionale, quale carattere usare per l'indentazione (usare "\t" per il tabulatore).

Example 5.11. indent


<?php
    
$smarty = new Smarty;
$smarty->assign('articleTitle', 'NJ judge to rule on nude beach.
Sun or rain expected today, dark tonight.
Statistics show that teen pregnancy drops off significantly after 25.');
$smarty->display('index.tpl');

?>

   

Dove index.tpl è:


{$articleTitle}

{$articleTitle|indent}

{$articleTitle|indent:10}

{$articleTitle|indent:1:"\t"}

   

Questo stamperà:


NJ judge to rule on nude beach.
Sun or rain expected today, dark tonight.
Statistics show that teen pregnancy drops off significantly after 25.

    NJ judge to rule on nude beach.
    Sun or rain expected today, dark tonight.
    Statistics show that teen pregnancy drops off significantly after 25.

          NJ judge to rule on nude beach.
          Sun or rain expected today, dark tonight.
          Statistics show that teen pregnancy drops off significantly after 25.

        NJ judge to rule on nude beach.
        Sun or rain expected today, dark tonight.
        Statistics show that teen pregnancy drops off significantly after 25.

   

Comments
No comments for this page.
Post a Comment
All comments are moderated. Support questions are ignored, use the forums instead.
Author:
Email: (not shown)
What is 20 plus 11? (Are you human?)

Advertisement