private function ExtractLocationNameFromContent($content)
{
//if there are no tags then just return the defult
if (!isset($content->tags) || !is_array($content->tags)) {
return "unknown";
}
//Set up the return variable with the defaul value
$return = "";
//loop through the content tags
foreach ($content->tags as $tag) {
//we are only interested in the where tag
if ($tag->type == "where") {
//set the location
$return .= $tag->text . ", ";
}
}
//If no where tags, return unknown
if (strlen($return) == 0) {
return "unknown";
}
//trim the extra comma and space off the end
$return = rtrim($return, " ,");
//return the location
return $return;
}