Get Smarty

Donate

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

Advertisement

count_sentences

Este es usado para contar el número de frases en la variable.

Example 5.6. count_sentences


<?php

$smarty->assign('articleTitle',
                 'Two Soviet Ships Collide - One Dies.
                 Enraged Cow Injures Farmer with Axe.'
                 );

?>

   

Donde el template es:


{$articleTitle}
{$articleTitle|count_sentences}

   

esta es la salida:


Two Soviet Ships Collide - One Dies. Enraged Cow Injures Farmer with Axe.
2

   

ver también count_characters, count_paragraphs y count_words.

Comments
No comments for this page.

Advertisement