Ver Mensaje Individual
  #2 (permalink)  
Antiguo 12/03/2012, 17:12
Avatar de GatorV
GatorV
$this->role('moderador');
 
Fecha de Ingreso: mayo-2006
Ubicación: /home/ams/
Mensajes: 38.567
Antigüedad: 18 años
Puntos: 2135
Respuesta: desplegable con ZEND

La sintaxís correcta para agregar elementos a un array es:
Código PHP:
Ver original
  1. $array = array();
  2. $array[] = $nuevoelemento
  3. // o
  4. $array[$foo] = $nuevoelemento

Al tu hacer esto:
Código PHP:
Ver original
  1. foreach ($options as $x){
  2.      $arrayLst = array( $x['id'] => $x['nom'] );
  3. }

Sobreescribes en cada vuelta tu lista.

Saludos.