[Gllug] OTish - Basic? PHP query

Dylan dylan at dylan.me.uk
Sat Oct 22 14:54:49 UTC 2005


Hi All,

I have a PHP script (index.php) which "include()"s a library script 
(lib.php) containing a function (extract_macro.) If I call 
extract_macro($x) from outside any function in index.php, it executes 
as expected. If, however, I call it from inside a function, it doesn't 
get executed. I assume it's out of scope, so is there an equivalent of 
global for functions, or do I need to "include" the script in every 
function?

Cheers

Dylan
-- 
"The man who strikes first admits that his ideas have given out."
                                                (Chinese Proverb)
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list