// you need to add this line in the head section
// <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
for ( $i = 1; $i <= 45; $i++) { $url="http://dsal.uchicago.edu/cgi-bin/romadict.pl?page=$i&table=molesworth&display=utf8"; $text=file_get_contents($url); $myarray = preg_match_all('#<font size="\+1">(.*?)</font>#i', $text, $matches); echo implode(' ',$matches[1]); }