Special Vars passed to a function??
Posted: Tue Aug 03, 2004 8:03 am
ok, ive been having this problem for ages and no-one i have asked has been able to give me an answer
ok say we're defining a function, like so
now thats fine, but what if we needed to pass a $_POST, $_GET, $_SESSION, $_SERVER etc etc, i keep getting errors in syntax.
so if i tried to do this
i am looking for someway of escaping but can find none
any help?
ok say we're defining a function, like so
Code: Select all
function get_time ()
{
$current_time = $time();
print $time;
}so if i tried to do this
Code: Select all
function get_time ($_POST['time'])
{
$current_time = $time();
print $time;
}any help?