How can we define a variable accessible in functions of a php script?
Answer / Savita Gupta
To define a variable accessible in functions of a PHP script, you should use the `global` keyword inside the function to reference the global scope variable.
| Is This Answer Correct ? | 0 Yes | 0 No |
How to access a Static Member of a Class in PHP?
What are the difference between array_keys() and array_key_exists() in php?
What is the purpose of the '.myd' file extension? What do thes file contain?
How to call javascript function in php on button click?
What is the difference between md5(), crc32() and sha1() crypto on php?
How to delete a file from the system?
How to connect to a url in php?
What does PEAR stands for?
What is helper function?
What are getters and setters php?
What is difference between php and wordpress?
How can we know the number of days between two given dates using PHP?
8 Answers AZTEC, HCL, Navsoft,