Web page hosting and cheap domain registration register services
 

Sponsers:

 

 

 

Smarty Manual
PrevChapter 5. Variable ModifiersNext

spacify

Parameter PositionTypeRequiredDefaultDescription
1stringNoone spaceThis what gets inserted between each character of the variable.

spacify is a way to insert a space between every character of a variable. You can optionally pass a different character (or string) to insert.

Example 5-16. spacify

<?php
$smarty
= new Smarty;
$smarty->assign('articleTitle', 'Something Went Wrong in Jet Crash, Experts Say.');
$smarty->display('index.tpl');
?>

Where index.tpl is:

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

This should output:

Something Went Wrong in Jet Crash, Experts Say.
S o m e t h i n g   W e n t   W r o n g   i n   J e t   C r a s h ,   E x p e r t s   S a y .
S^^o^^m^^e^^t^^h^^i^^n^^g^^ ^^W^^e^^n^^t^^ ^^W^^r^^o^^n^^g^^ ^^i^^n^^ ^^J^^e^^t^^ ^^C^^r^^a^^s^^h^^,^^ ^^E^^x^^p^^e^^r^^t^^s^^ ^^S^^a^^y^^.

PrevHomeNext
replaceUpstring_format
 

 

 

 

Search engine submission by Seosubmit.com | Cheap domain by Cheap Domain Registrar  

Disclaimers: This document is provided as free service for the benefits of Active-Venture.com's web hosting customers only.

 
Quotes: It is often better to have a great deal of harm happen to one than a little; a great deal may rouse you to remove what a little will only accustom you to endure.