" . $row['town_name'] . ""; if (preg_match('/A|B|C|D/', $letter)) { array_push($towns['ABCD'], $town); } elseif (preg_match('/E|F|G|H/', $letter)) { array_push($towns['EFGH'], $town); } elseif (preg_match('/I|J|K|L/', $letter)) { array_push($towns['IJKL'], $town); } elseif (preg_match('/M|N|O|P/', $letter)) { array_push($towns['MNOP'], $town); } elseif (preg_match('/Q|R|S|T/', $letter)) { array_push($towns['QRST'], $town); } elseif (preg_match('/U|V|W/', $letter)) { array_push($towns['UVW'], $town); } elseif (preg_match('/X|Y|Z/', $letter)) { array_push($towns['XYZ'], $town); } } ////////////////////////////////////////////// // get the county facts ////////////////////////////////////////////// $query = @mysql_query( "SELECT * FROM pages, published_page_values, counties WHERE counties.county_name='$county' AND pages.page_county_id=counties.county_id AND published_page_values.page_value_page_id=pages.page_id AND page_value_template_modules_id='11' AND published_page_values.page_value_module_option_id IN('34','35','36','37') ORDER BY published_page_values.page_value_module_option_id" ) or die(ERROR_MESSAGE); while ($row = mysql_fetch_assoc($query)) { $info['county_facts']['option_' . $row['page_value_module_option_id']] = $row['page_value_data']; } foreach ($info['county_facts'] as $key => $value) { $info['county_facts'][$key] = preg_replace('/.+\"VALUE\"\;s\:\d*\:\"(.+)\"\;\}$/', '$1', $value); } ////////////////////////////////////////////// // get the county online services ////////////////////////////////////////////// $query = @mysql_query( "SELECT * FROM pages, published_page_values, counties WHERE counties.county_name='$county' AND pages.page_county_id=counties.county_id AND published_page_values.page_value_page_id=pages.page_id AND page_value_template_modules_id='13' AND published_page_values.page_value_module_option_id='29' ORDER BY published_page_values.page_value_module_option_id" ) or die(ERROR_MESSAGE); while ($row = mysql_fetch_assoc($query)) { $info['county_services']['option_' . $row['page_value_module_option_id']] = $row['page_value_data']; } foreach ($info['county_services'] as $key => $value) { preg_match_all('/\"(\d+)\"/', $value, $out); } $services = join(",", $out); foreach ($out[1] as $key => $value) { $values .= "'$value',"; } $values = preg_replace('/,$/', '', $values); $links = ''; if (!preg_match('/^\s*$/', $values)) { $query = @mysql_query( "SELECT * FROM online_services WHERE online_service_id IN($values)" ) or die(ERROR_MESSAGE); $i = 0; $info['county_services'] = array(); while ($row = mysql_fetch_assoc($query)) { $links .= "

" . $row['online_service_name'] . "

"; $info['county_services'][$i]['service'] = $row['online_service_name']; $info['county_services'][$i]['url'] = $row['online_service_url']; $i++; } } $links .= "

Trailer Renewal

"; ?> Local: Maine.gov
  1. Home
  2. » Local

Local

County of

Online Services

Cities, Towns, & Townships

A-B-C-D
E-F-G-H
I-J-K-L
M-N-O-P
Q-R-S-T
U-V-W
X-Y-Z

County Facts

Population:

Land Area:

Incorporation Date:

County Seat:

Contact Information

Address:

,
Map It

Tel:

Fax:

" . polling_places_dd($town) . " "; } elseif ($_REQUEST['show'] === 'lib') { echo "
" . libaries_dd($town) . " "; } elseif ($_REQUEST['show'] === 'twnoff') { echo "
" . town_offices_dd($town) . " "; } ?>