Compare permalink to current URL
<?php
/* -- Compare the URL to the permalink, return true if matches -- */
function is_current_page($permalink) {
$url = 'http://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];
if (strpos($url,$permalink) !== false)
return true;
else
return false;
}
?>