Re: build array dinamicaly
| From: | Richard Emery | Date: | Mon, 29 Apr 2002 20:56:47 +0000 |
| Subject: | Re: build array dinamicaly | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-95257@lists.php.net to get a copy of this message | ||
$query = "SELECT name,address FROM tbl";
$result = mysql_query($query);
while($myarray[] = mysql_fetch_array($result);
----- Original Message -----
From: Rodrigo Peres <rperes@mac.com>
To: PHP <php-general@lists.php.net>
Sent: Monday, April 29, 2002 9:20 AM
Subject: [PHP] build array dinamicaly
Hi list,
I want to buil an multidimensional array with the results of Mysql, but I
don't know how to do it.
What I need is:
"SELECT name,adress from tbl_....."
array name will receive the names
array adress will receive the adresses
and array clientes will contain both, so when i try to access i will have
something like $cliente['nome'][0] or $clientes['adress'][1] and so on.
Someone can help???
Thank's in advace
Rodrigo Peres
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php