/**
* function, receives string, returns seo friendly version for that strings,
* sample: 'Hotels in Buenos Aires' => 'hotels-in-buenos-aires'
* - converts all alpha chars to lowercase
* - converts any char that is not digit, letter or - into - symbols into "-"
* - not allow two "-" chars continued, converte them into only one syngle "-"
*
* @param string $vp_string string to make friendly
*/
function friendly_seo_string($vp_string)
{
$vp_string = trim($vp_string);
$vp_string = html_entity_decode($vp_string);
$vp_string = strip_tags($vp_string);
$vp_string = strtolower($vp_string);
$vp_string = preg_replace('~[^ a-z0-9_.]~', ' ', $vp_string);
$vp_string = preg_replace('~ ~', '-', $vp_string);
$vp_string = preg_replace('~-+~', '-', $vp_string);
return $vp_string;
}