date_format
| From: | Joel Lord | Date: | Mon, 13 Jan 2003 18:33:49 +0000 |
| Subject: | date_format | ||
| Groups: | php.smarty.general | ||
| Request: | Send a blank email to php-smarty-general+get-7149@lists.php.net to get a copy of this message | ||
Hi everyone,
I have another newbie question ;). I have a variable named
$empinfo[1] that is passed to my .tpl file by my .php file. This file
may contain a date but may also be empty. I need to format it on my
template so I use the following command:
{$empinfo[1]|date_format:"%d %B %Y"}
The problem is that when it's empty, it prints out today's date. I know
I could use a {if}.{/if} but I need (if possible, of course) to use only
one tag so I must avoid ifs.
Thanks a lot for your help,
Joel Lord