} ?> <tr> <td> <label for="subgiro"> Categorías </label> </td> </tr> <tr> <td> <select name="cat[]" class="multiselect" style="width:500px; height:200px;" multiple="multiple"> <?php $subg2 = EconomicUnitCategory::findAll(); foreach ($subg2 as $sg) { if (in_array($sg->prepareEconomic_unit_category_id(), $subsg)) { $sel = "selected=\"selected\""; } else { $sel = ""; } echo '<option ' . $sel . ' value="' . $sg->prepareEconomic_unit_category_id() . '"> ' . $sg->prepareEconomic_unit_category_name() . '</option>'; } ?> </select> </td> </tr> </table> </form> </div>