Well, the obvious thing would be to have all your stadiums (stadia?) in the same table in your database. That'd get rid of the need to store them in a text file and let you get rid of your foreach loop. I guess your table would be something like:
<code>
SELECT DISTINCT (stadium), city, country
FROM stadiums;
|id |stadium |city |country |
---------------------------------------
|1 |wembley |london |uk |
...etc.
</code>
You could also drop the embedded if statement, because it will always be false - the stadium field can't be both blank and non-blank at the same time i.e.
<code>
if ($result->{"stadium"} ne "") { # if stadium field IS NOT blank...
# ...
$stadium = $result->{"stadium"};
# ...
if ($stadium eq "") { # ...and if stadium field IS blank
# ...
}
</code>
HTH
Charlie
--
Don't Stand on your head - you'll get footprints in your hair
http://charlieharvey.org.uk
http://charlieharvey.com