Author:
erics, October 1st, 2012
Add the parameter label_ids=true. For example:
|
{html_radios name="yourName" label_ids=true options=$yourOptions selected=$smarty.request.yourName separator="<br/>"} |
Categories: How-To's, Technology Tags: howto, html, html_radios, ID, Missing, php, Radio, Radio Button, Radios, Smarty, tips
| No comments
Author:
erics, January 27th, 2012
The PHP
|
$sql = 'select * from yourTable'; $result = mysql_query($sql); $rows = array(); while ($row = mysql_fetch_assoc($result)) { $rows[] = $row; } $page = new Smarty(); $page->assign('rows', $rows); $page->show('yourTemplate.php'); |
The Smarty Template
|
{if $rows} {section name=row loop=$rows} {foreach from=$rows[row] key="Key" item="Value"} <p>{$Key}: {$Value}</p> {/foreach} {/section} {else} <h1>NO ROWS FOUND</h1> {/if} |
Categories: How-To's, Technology Tags: howto, mysql, php, select, Smarty, tips
| No comments
Author:
erics, December 1st, 2011
PHP number_format($number, 2, ‘.’, ‘,’); SMARTY {$number|number_format:2:”.”:”,”}
Categories: How-To's, Technology Tags: Format, howto, Number, php, Smarty, tips
| No comments