$name = Array();
$address = Array();
$clients = Array('nome' => 0, 'address' => 0);

$i = 0;
while (list($client_name, $cliente_add) = mysql_fetch_array($res)) {
    $name[$i] = $client_name;
    $address[$i] = $client_address
    $clients['nome'][$i] = $client_name;
    $clients['address'][$i] = $clients_address;
    $i++;
}

  Alguma coisa do genero :-)


--

Julio Nobrega.

Um dia eu chego lá:
http://sourceforge.net/projects/toca

Ajudei? Salvei? Que tal um presentinho?
http://www.submarino.com.br/wishlistclient.asp?wlid=664176742884


"Rodrigo Peres" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> 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

Reply via email to