Comunitatea PHP Romania
 

 
count_sentences

count_sentences

This is used to count the number of sentences in a variable.

Example 5-6. count_sentences

<?php

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

?>

Where template is:

{$articleTitle}
{$articleTitle|count_sentences}

Will output:

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

See also count_characters, count_paragraphs and count_words.

Ultimele discutii in forum RSS Forum

Ultimele articole Ultimele articole

Top membri

Pirahna Pirahna
acasa , in pat
carco carco
Bucuresti
Birkoff Birkoff
Bucuresti
Mascka Mascka
Braila
raul_ raul_
whooper whooper
Toronto ON
mihaitha mihaitha
Sibiu
gabysolomon gabysolomon
Bacau
oriceon oriceon
Constanta
garlicinicolae garlicinicolae

Newsletter


Email:
 inscriere
 renuntare
 
 Arhiva newsletter

Parteneriat

Copyright © 2001-2008 PHP Romania Add PHPRomania to Google Add PHPRomania to Del.icio.us Add PHPRomania to Stumbleupon Add PHPRomania to Yahoo! Add PHPRomania to Digg Add PHPRomania to Blink Mortgage | Cheap Loan | Credit Cards | Mortgage | Northern Rock
Ads: Partener Way2Web Nework: gazduire web | inregistrare domenii | web design | imobiliare | web hosting
Powered by Simplis