I have to extract the need for "page" i.e 5 out of this url - http://snypher.local/photos/page/5 What must i do in order to extract it in Wordpress? I'm not capable of getting it in the $_GET super global.

function get_url_var($name)
{
    $strURL = $_SERVER['REQUEST_URI'];
    $arrVals = split("/",$strURL);
    $found = 0;
    foreach ($arrVals as $index => $value) 
    {
        if($value == $name) $found = $index;
    }
    $place = $found + 1;
    return $arrVals[$place];
}

$page = get_url_var('page');

I have tried personally this function to obtain the worth of the variable page in the url.

Found a pleasant solution and Let me share it for I had been searching for the identical factor!

http://wordpress.org/support/topic/get-current-page-number-for-paginated-posts

Therefore it is like:

<?php echo '(Page '.$page.' of '.$numpages.')'; ?>