I'm trying to build a list of towns to add at the bottom of a site I'm working on and I can echo the variable fine within this block of PHP, however when I try to echo $result1 in another block of PHP it's only returning the first result, rather than the whole list.
Any ideas what's going on?
$result = mysql_query("SELECT town FROM jb_town_postcodes");
$results = array();
while($row = mysql_fetch_assoc($result))
echo $results1 = $row['town'];