Get Smarty

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:

Check reviews of PHP Web Hosting, compatible with Smarty Templates

spacify

spacify est un moyen pour insérer un espace entre tous les caractères d'une variable. Optionnellement, vous pouvez lui passer un caractère (ou une chaîne) différent de l'espace à insérer.

Position du paramètre Type Requis Defaut Description
1 chaîne de caractère Non espace Ce qui est inséré entre chaque caractère de la variable.

Example 5.17. spacify


<?php

$smarty->assign('titreArticle', 'Quelque chose s\'est mal passé et à provoqué
cet accident, disent les experts');

?>

Où le template est :


{$titreArticle}
{$titreArticle|spacify}
{$titreArticle|spacify:"^^"}

Affichera :


Quelquechose s'est mal passé et à provoqué cet accident, disent les experts.
Q u e l q u e c h o s e   .... snip ....   l e s   e x p e r t s .
Q^^u^^e^^l^^q^^u.... snip .... ^r^^t^^s^^.


Voir aussi wordwrap et nl2br.

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 17 plus 10? (Are you human?)

Sponsors [info]

Cheap Website Hosting @hostdone.com
email marketing @ActiveCampaign
broadband deals @BroadbandGenie
Best UK Web Hosting @webhost.uk.net
Reliable UK and US Web Hosting @rshosting.com
Cheap US and UK Web Hosting @infrenion.com
I.T Certification Exams @pass-guaranteed.com
Certification Practice Tests @firsttrycertify.com
Certification Practice Exam Questions @ace-it-certifications.com
Broadband Speed Test @broadbandspeed.co.uk
bulk email software @americaint.com
ASP.NET hosting @aspnethosting.co.uk