Professional CodeIgniter

(singke) #1

Chapter 7: Improving the Dashboard


229


echo form_checkbox(‘colors[]’, $key, $checked). $value;
}
echo form_fieldset_close();

echo form_fieldset(‘Sizes’);
foreach ($sizes as $key = > $value){
if (in_array($key,$assigned_sizes)){
$checked = TRUE;
}else{
$checked = FALSE;
}
echo form_checkbox(‘sizes[]’, $key, $checked). $value;
}
echo form_fieldset_close();

Once you have these changes loaded, you should be able to edit a product that has color and size
settings associated with it and see checked choices on the interface, as shown in Figure 7 - 16.


Figure 7-16

Free download pdf