faqts : Computers : Programming : Languages : PHP : Common Problems : Variables

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

2 of 17 people (12%) answered Yes
Recently 0 of 10 people (0%) answered Yes

Entry

I have a var passed to a page with an inc. file. How to use var in func

Dec 15th, 2002 03:11
Dan Stockton, Edward Whitehead,


$var="passed in from inc. file";
.
function globalvar()
{global $var;
echo $var;
return $var;}
.
That said,
<?globalvar()?> will return 'passed in from inc. file'