On Thursday 06 February 2003 22:04, Vernon wrote: > I'm trying to create an array from a rocordset that will do somethingt like > this: > $datay=array(12,8,19,3,10,5,55,88,3); > > the following is the code I have attempted to create, which is not working: > > do { > $dat = ($row_rsCOUNTRY['CountryCount'] & "," > $row_rsCOUNTRY['CountryCount']); > } while ($row_rsCOUNTRY = mysql_fetch_assoc($rsCOUNTRY)); > > $datay=array($dat);
unset($datay); // just in case it is already defined while ($row_rsCOUNTRY = mysql_fetch_assoc($rsCOUNTRY)) { $datay[] = $row_rsCOUNTRY['CountryCount']; } print_r($datay); -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * ------------------------------------------ Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general ------------------------------------------ /* Ma Bell is a mean mother! */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php