Home »
MCQs »
PHP MCQs
There are two variables a, b which declared in global scope, which is the correct PHP statement to access them within a function?
21. There are two variables a, b which declared in global scope, which is the correct PHP statement to access them within a function?
- global $a, $b;
- global $a $b;
- global ($a, $b);
- php_global $a, $b;
Answer: A) global $a, $b;
Explanation:
The correct PHP statement to access them within a function is: global $a, $b;