mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-06 03:14:27 +02:00
example now has a variable also
This commit is contained in:
@@ -76,6 +76,9 @@
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
||||
$config['date'] = '%I:%M %p';
|
||||
$config['time'] = '%H:%M:%S';
|
||||
$smarty->assign('config',$config);
|
||||
$smarty->assign('yesterday', strtotime('-1 day'));
|
||||
|
||||
?>
|
||||
@@ -88,10 +91,10 @@ $smarty->assign('yesterday', strtotime('-1 day'));
|
||||
<![CDATA[
|
||||
{$smarty.now|date_format}
|
||||
{$smarty.now|date_format:"%D"}
|
||||
{$smarty.now|date_format:"%I:%M %p"}
|
||||
{$smarty.now|date_format:$config.date}
|
||||
{$yesterday|date_format}
|
||||
{$yesterday|date_format:"%A, %B %e, %Y"}
|
||||
{$yesterday|date_format:"%H:%M:%S"}
|
||||
{$yesterday|date_format:$config.time}
|
||||
]]>
|
||||
</programlisting>
|
||||
<para>
|
||||
|
Reference in New Issue
Block a user