ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> php-spanish
php-spanish
Re: [PHP-ES] variables en un array
by Gaston other posts by this author
Aug 31 2003 1:39AM messages near this date
Re: [PHP-ES] variables en un array | Re: [PHP-ES] OT: javascript option
en forma automatica no conozco ninguna, tal vez alguien mas si
pero x ahi esto te sirve esto:
suponiendo que el array es algo asi $lista[ n ]:

$lista[0] = "aa" ;
$lista[1] = "bb" ;
$lista[2] = "cc" ;

if ( isset( $lista ) ) {
    $i = 0 ;
    for ( $i = 0 ; $i < count($lista) ; $i++ ) {
        $nombrevariable = "variable".$i ;
        $$nombrevariable = $lista[ $i ] ;
        // esto deberia crear $variable1 , $variable2 ....
    }
}

echo $variable0."<br> " ;
echo $variable1."<br> " ;
echo $variable2."<br> " ;





----- Original Message -----
From: "Luis Mario" <mario@[...].mx> 
To: <lista@[...].com> 
Sent: Saturday, August 30, 2003 8:46 PM
Subject: [PHP-ES] variables en un array


>  Hola a todos los de la lista, tengo un array de datos que recibo en otra
>  pagina mediante POTS, ahora bien me gustaria saber si hay una manera de
>  sacar cada elemento y meterlo cada uno una variable independiente, para
>  manipularlos.
> 
>  de antemano gracias
> 
> 
> 
>  Luis Mario Meraz Dominguez
>  WebDeveloper
>  [Drag me, drop me, treat me like an object]
>  www.mundoweb.com.mx
>  E-Mail: mario@[...].mx
>  Tel: +52 951 5 15 20 58
>  Cel: 0449515471563
> 
> 
> 
> 
>  ---------------------------------------------------------------------
>  Archivo On-line:  http://www.phpes.com/
>  via news: news://news.phpes.com/
>  Manual PHP en español: http://www.php.net/manual/es/
>  Para dar de baja la suscripción, mande un mensaje a:
>     lista-unsubscribe@[...].com
> 


---------------------------------------------------------------------
Archivo On-line:  http://www.phpes.com/
	via news: news://news.phpes.com/
Manual PHP en español: http://www.php.net/manual/es/
Para dar de baja la suscripción, mande un mensaje a:
   lista-unsubscribe@phpes.com
Thread:
ACP-Ariel Alegre
Jabi
Gaston
Gaston
Luis Mario
Gaston
Claudio Bustos
Gaston
Claudio Bustos

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved