get_population($row['ID']) is causing error Variable undefined:
foreach($filterList as $row)
{
echo '<tr>';
echo '<td>' . $row['county_ID'] . '</td>';
echo '<td>' . get_population($row['ID']) . '</td>';
echo '<td>' . $row['ID'] . '</td>';
echo '</tr>';
}
When I use a database value in the function parameter I get the error :Undefined variable: It must be out of scope but I don't know how to get around it.
If I print $row['ID'] it shows the value of 1 for this example. If I hard code 1 as the parameter value it works. It is only when I try to pass $row['ID'] to the function that I get the error.
I am sure it is a simple answer but I am chasing my tail. Thanks
get_population()function? Can you post that too?