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 dental loupes? LoupesUSA.com is your best choice!

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

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

Wholesale Fashion Jewelry from wholesalers WhatWholesale.com

Soccer xp shop is discounted Soccer Cleats and Cheap Soccer Shoes for Sale at soccerxpshop.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 10 plus 16? (Are you human?)

Advertisement