Ver Mensaje Individual
  #8 (permalink)  
Antiguo 17/10/2009, 13:27
Avatar de David
David
Moderador
 
Fecha de Ingreso: abril-2005
Ubicación: In this planet
Mensajes: 15.720
Antigüedad: 19 años, 10 meses
Puntos: 839
Respuesta: Problemas con Array

Es para que el parser sepa que en realidad lo que quieres es usar la variable con nombre $campos_exp[$x] como array para añadirle un nuevo índice [].

Véase: http://php.net/manual/en/language.va...s.variable.php
Cita:
In order to use variable variables with arrays, you have to resolve an ambiguity problem. That is, if you write $$a[1] then the parser needs to know if you meant to use $a[1] as a variable, or if you wanted $$a as the variable and then the [1] index from that variable. The syntax for resolving this ambiguity is: ${$a[1]} for the first case and ${$a}[1] for the second.
Saludos.
__________________
Por favor, antes de preguntar, revisa la Guía para realizar preguntas.