Re: how can i pass a value to an included file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> how can i pass a value to an included file??
> its like this
> include "abc.php?value=$xyz";

No.  As previously stated variables that are already set are essentially 'passed' to the 
include file.  HOWEVER... if you are defining a function... in the include file you may have 
to do one of these:

1.
function something ()
{
    global $xyz;
}

OR

2.
function something ($xyz)
{
}

OR even

3.
function something (&$xyz)
{
}

What is in $xyz and what you are doing with it will dictate which method of access to use.


[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Soap]     [Kernel Newbies]     [Yosemite]     [Yosemite Campsites]

  Powered by Linux