Answers for "declare variable as global"

PHP
1

How to define global variables

Use pm.globals to define a global variable:

pm.globals.set("variable_key", "variable_value");
Posted by: Guest on December-07-2020
0

declare variable as global

$GLOBALS['a'] = 'localhost';

function body(){

    echo $GLOBALS['a'];
}
Posted by: Guest on June-22-2021

Code answers related to "declare variable as global"

Browse Popular Code Answers by Language