How about:
return $current_page_name[count($current_page_name)-1];

-----Original Message-----
From: Erik Price [mailto:[EMAIL PROTECTED]] 


Can anyone give my puny mind an explanation as to why the following 
function only returns the value "Array" ?

# ===============================================================
# get_current_page_name()
# ---------------------------------------------------------------
# Returns the current document
#  Arguments
# -----------
# no arguments
# ===============================================================

function get_current_page_name()
{
    $current_page_name = explode("/", $_SERVER['PHP_SELF']);
    $current_page_name = array_slice($current_page_name, -1);
    return $current_page_name;
}



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to