" size="35"/>(*)</td> </tr> <tr> <td>Apellidos</td> <td><input name="apellidosusuario" type="text" value="<?php echo $apellidos_usuario; ?> " size="35"/>(*)</td> </tr> <tr> <td>Departamento</td> <td> <select name="departamento"> <option value=0> Seleccionar </option> <?php $AllDepartamento = $departamento->GetAll(); $claves = array_keys($AllDepartamento); $cant = count($AllDepartamento); if ($cant > 0) { for ($i = 0; $i < $cant; $i++) { echo "<option value={$claves[$i]}"; if ($claves[$i] == $id_departamento) { echo " selected "; } echo ">"; foreach ($AllDepartamento["{$claves[$i]}"] as $valor) { echo "{$valor}</option>"; } } } ?>