Re: indices con cadenas en array
| From: | Vladimir Hernandez | Date: | Fri, 10 Mar 2006 16:11:59 +0000 |
| Subject: | Re: indices con cadenas en array | ||
| References: | 1 2 | Groups: | php.general.es |
| Request: | Send a blank email to general-es+get-58187@lists.php.net to get a copy of this message | ||
Quoting Satyam <Satyam@satyam.com.ar>:
foreach($variable as $clave => $valor) { echo '$variable[' , $clave , '] = ' , $valor; } ----- Original Message ----- From: "Javier Martinez" <ecentinela@gmail.com> To: <php-es@lists.php.net> Sent: Friday, March 10, 2006 4:26 PM Subject: [PHP-ES] indices con cadenas en arrayCon esto: http://mx.php.net/manual/en/function.array-values.php http://mx.php.net/manual/en/function.array-keys.php y un poco de código. -- Vladimir Hernández http://linuxbaja.org/ Linux user #374079Tomando este array $variable["usuario"] = "juan"; $variable["password"] = "micasa"; ¿Como puedo obtener ahora como se llama el indice y el valor de ese indice en el array de forma separada? Es decir, este resultado: $valor1 = "usuario"; $valor2 = "juan"; $valor3 = "password"; $valor4 = "micasa"; -- PHP Spanish Localization Talk Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php-- PHP Spanish Localization Talk Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php