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