Been trying and seeking for a way to pass a finished array after it has been populated from the database:
$query = 'SELECT * FROM Members ORDER BY Company';
$results = mysql_query($query);
while($line = mysql_fetch_assoc($results)) {
$companyname = $line["Company"]."</p>";
$names = array($companyname);
print_r($names);
}
After the names array is populated, I would like to send it to some other functions. Is there a way to invoke a callback or test for an error when the fetch from the database is finished?
Thanks for your time!!