How can the PHP function `basename()` be used to determine the current page name?
To determine the current page name using the PHP function `basename()`, you can get the full URL of the current page using `$_SERVER['PHP_SELF']`, and then pass it as an argument to `basename()` to extract the file name. This will give you the current page name without the directory path.
$current_page = basename($_SERVER['PHP_SELF']);
echo $current_page;