How to create an array of values in Smarty, and how to decline month names into the genitive case

Practice




how to create an array of values in smarty and how to decline month names into the genitive case

try one of these options

{*assign var=foo value=['y'=>'yellow','b'=>'blue']}
{$foo['y']*}
{*assign var="variable_name" value=create_array:"Января":"Февраля":""*}
{*assign var=$col_width value=array(’Января’,’Февраля’)*}
{*assign var="interests" expr="array('Января', 'Февраля', 'Марта')"*}





{$myDate |date_format:"%e %B в %H.%M "|replace:'ь':'я'|replace:'ай':'ая'|replace:'рт':'рта'|replace:'ст':'ста'}

Comments

To leave a comment

If you have any suggestion, idea, thanks or comment, feel free to write. We really value feedback and are glad to hear your opinion.
To reply

Lectures and tutorial on "Running server side scripts using PHP as an example (LAMP)"

Terms: Running server side scripts using PHP as an example (LAMP)