Comunitatea PHP Romania
 

 
count_characters

count_characters

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

Parameter PositionTypeRequiredDefaultDescription
1booleanNoFALSEThis determines whether or not to include whitespace characters in the count.

Example 5-4. count_characters

<?php

$smarty
->assign('articleTitle''Cold Wave Linked to Temperatures.');

?>

Where template is:

{$articleTitle}
{$articleTitle|count_characters}
{$articleTitle|count_characters:true}

Will output:

Cold Wave Linked to Temperatures.
29
33

See also count_words, count_sentences and count_paragraphs.

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 Fantasy Football | Change without Stress | Charity | Cheap Car Insurance | Loans
Ads: Partener Way2Web Nework: gazduire web | inregistrare domenii | web design | imobiliare | web hosting
Powered by Simplis