function a()
{
$a="some value"
$b="some other value"
function b($someArg)
{.....}
function c($someArg)
}
in function b and c, I would like to access the values of $a and $b.
how can I do that?
Thanks a bunch in advance
Moderator: General Moderators
Code: Select all
<?php
global $a, $b;
?>Code: Select all
function a(){
...
...
return array($a,$b);
}
function b(){
list(a,b)=a();
}