I'm trying to get a function to reference a variable outside of it. Here's part of the code:
<?php
$current_page=basename($PHP_SELF);
function nav_bar($link_name)
{
if ($current_page==$link_name)
.
.
.
IT GIVES ME THIS ERROR:
Warning: Undefined variable: current_page in c:\program files\apache group\apache\htdocs\mytest.php on line 7
FOR SOME REASON IT DOESN'T UNDERSTAND $current_page. Do I need to set current_page as a global variable?