Listing all id's in array

From: Date: Wed, 28 Apr 2004 20:01:00 +0000
Subject: Listing all id's in array
Groups: php.general 
Request: Send a blank email to php-general+get-184899@lists.php.net to get a copy of this message
I want to list all the product id's af the database in an array, but i do not how. I have this script but it is not working: $model = array(); $query = "SELECT product_id FROM products"; $result = mysql_query($query) or die("error in query - $query - ".mysql_error()); while (list($product_id) = mysql_fetch_array($result)) { $model = "$product_id"; } echo "$model"; Plese someone tell me how to do it... Thanks

« previous php.general (#184899) next »