read this page a little closer! http://www.php.net/manual/en/function.mysql-fetch-array.php
the mysql_fetch_array(); does not pull all the results in one big array. it IS only a single row of data. try this out, it should do what you are looking to do. $results = mysql_query("SELECT * FROM models WHERE lang='$lang' AND key1='data' AND key2='$series'",$db); while ($models = mysql_fetch_array($results)) { echo $models ."<p>"; } Jim ----- Original Message ----- From: "René Fournier" <[EMAIL PROTECTED]> To: "Php-General" <[EMAIL PROTECTED]> Sent: Thursday, November 08, 2001 2:25 PM Subject: [PHP] Array HELP PLEASE > (Before you write RTFM, please know that I have checked www.php.net, > zend.com, phpbuilder.com, et all, and--in the eternal words of Bono--I still > haven't found what I'm looking.) > > The situation: I extract an array from a MySQL table. Code: > > $models = mysql_fetch_array(mysql_query("SELECT * FROM models WHERE > lang='$lang' AND key1='data' AND key2='$series'",$db)); > > Based on the above criteria, there should be two rows in $modelsrow, with > each row containing about twenty elements. (A two-dimensional array, > right?) All I want to do is display the contents of $models. With the > following... > > for ($i = 1; $i <= 20; $i++) { > echo $models[$i]."<p>"; > } > > ...I get just one row. How can I also display the other row? I've tried > variations of $models[1][2], but I just can't get right syntax. (Help is > much appreciated. Thanks.) > > If you know of a good tutorial on multidimension arrays + mySQL, that would > be nice too. > > ...Rene > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]