I need to try for a dropdown with the name of the month, day and year in another loop, s
I am trying to convert a mm loop to a string format, for example, the first month is jan, and the value is 1
the output will be lower
<option value=1>jan</option>
i use the following code
<select name="dd" id="dd"> <option value="">Day</option> {for $foo=1 to 31} <option value="{$foo}">{$foo}</option> {/for} </select> <select name="mm" id="mm"> <option value="">Month</option> {for $foo=1 to 12} <option value="{$foo}">{$smarty.now|date_format:"%b"}</option> {/for} </select> <select name="yy" id="yy"> <option value="">Year</option> {for $foo=1970 to {$foo|date_format:"%Y"}} <option value="{$foo}">{$foo}</option> {/for} </select>
help me..
user1423506
source share