http://www.'.domain_short.'/ weekly 1 '; $count = 0; $city_list_exp = explode(",", $city_list); foreach ($city_list_exp as $city) { if ($city != NULL) { $url = strtolower(str_replace(" ", "-", $city)); echo ' http://www.'.domain_short.'/'.$url.'.html weekly 1 '; } } echo ' '; ?>