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?

  1. global $a, $b;
  2. global $a $b;
  3. global ($a, $b);
  4. php_global $a, $b;

Answer: A) global $a, $b;

Explanation:

The correct PHP statement to access them within a function is: global $a, $b;

Comments and Discussions!

Load comments ↻






Copyright © 2024 www.includehelp.com. All rights reserved.