-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On September 12, 2002 00:56, Christian Ista wrote:
> >   array(
> >     array( $temp[0], $temp[1] ),
> >     array( $temp[1], $temp[2] )
> >   )
>
> I thinks it's not the right way.
>
> I have a query, this query can return 1,5,20, 200, ... rows, each row has
> 5 fields (or more or less).
>
> I'd like a 2 dimensions array, one line by row and each cell is a field
> content of the query.
>
> I program in a lot of language C/C++, Java, Delphi, C++Builder,
> ColdFusion, C# and I don't undersand why the PHP syntax for this kind of
> think is so complex and not clear.

  Good Lord! I thought that you wanted to transform an of array query results
  into a multi-dimensional array.

  Briefly, you want to do this:

  $result = mysql_query(...);
  while( $t = mysql_fetch_row($result) ){
    $array[] = $t;
  }

  Just read the MySQL section in the PHP manual for more details.

Cheers!
- --zak
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE9gDCIb6QONwsK8bIRAitjAJ0bUVpwvcdbrIayNQFtbfPqtHJSkwCdGmrq
OIkNSi0vING+U/+/GgYf/58=
=d63f
-----END PGP SIGNATURE-----


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to