// If the flag all is set then run an "all" query. else we need to do some specifics on the query instead.
if ($flag['all'] == 1) {
$sql = 'SELECT * FROM data_resources';
}else {
$sql = '';
#### Run Query ####
$data = array(); //This is the master array that will contain all results.
$query = mysql_query($sql);
$data[] = $row;
}
?>
If I echo out the data array inside the while statement it works properly, but when I try to access it outside of the while it doesn't work. What is going on? Normally this works just fine.