Example #1
0
function get_banner_type($code)
{
    $types = banners_types();
    if (isset($types[$code])) {
        return $types[$code];
    }
    return FALSE;
}
Example #2
0
    <?php 
echo form_error('main_title');
?>
</li>
<li>
    <label>Sub-title:</label>
    <input name="sub_title" id="sub_title" class="txtbox" value="<?php 
echo set_value('sub_title');
?>
" />
    <span class="star">*</span>
    <?php 
echo form_error('sub_title');
?>
</li>
<li>
    <label>Type:</label>
    <?php 
$types = array('' => "--Select--");
foreach (banners_types() as $key => $value) {
    $types[$key] = $value;
}
?>
    <?php 
echo form_dropdown('type', $types, set_value('type'));
?>
    <span class="star">*</span>
    <?php 
echo form_error('type');
?>
</li>