Ver Mensaje Individual
  #4 (permalink)  
Antiguo 20/10/2011, 14:24
Rasec101
 
Fecha de Ingreso: diciembre-2009
Ubicación: Santiago, Chile
Mensajes: 143
Antigüedad: 14 años, 4 meses
Puntos: 2
Respuesta: Problema con checkbox dinamicos

Gracias otra ves andresdzphp: lo solucione me funciona perfecto acá esta el codigo como quedo por si a algen le sirve a futuro
Código PHP:
Ver original
  1. <?                        
  2.                                           $clUsuarios  = new Usuarios();
  3.                                             $Res= $clUsuarios->UsuarioInfo($idCliente);
  4.                                              
  5.                                                  
  6.                                                 if(count($Res) > 0)
  7.                                                 {
  8.                                                     foreach($Res as $cate)
  9.                                                     {
  10.                                                        
  11.                                                         $indicar = split(",",$cate["grpCategorias"]);
  12.                                                            
  13.                                                             //echo"".$indicar."";
  14.                                                        
  15.                                                        
  16.                                                      
  17.                                                     }
  18.                                                 }
  19.         // echo "<tr><td rowspan='4' valign='top'> INTERESES</td>";
  20.                                                
  21.                                                 $clCategorias = new Categorias();
  22.                                                 $resCategorias = $clCategorias->ListarCategorias();
  23.                                              
  24.                                                  echo "<tr><td rowspan='".count($resCategorias)."' valign='top'> INTERESES</td>";
  25.                                                 if(count($resCategorias) > 0)
  26.                                                 {
  27.                                                     foreach($resCategorias as $cat)
  28.                                                     {
  29.                                                        
  30.                                                         $indi = $cat["idCategoria"];
  31.                                                            
  32.                                                             echo"<td>
  33.                                 <input id='checkbox' name='ArregloCategorias[]' type='checkbox' value='".$cat["idCategoria"]."'";?>
  34.                                 <? if (in_array($indi, $indicar)) {echo "checked";}?><?php echo"></td><td>".$cat["nombre"]."</td></tr>";
  35.                                                        
  36.                                                        
  37.                                                      
  38.                                                     }
  39.                                                 }
  40.                                                ?>