➤ The global keyword imports variables from the global scope into the local scope of a function. For instance:
$x = 10;
$y = 5;
function additional_first(){
	return $x + $y;
}
echo additional_first();
// outputs :  Undefined variables $x and $y

function additional_second(){
	
global $x,$y;
return $x + $y; } echo additional_second(); // outputs : 15
by Levani Makhareishvili
2 years ago
PHP
1
Pro tip: use ```triple backticks around text``` to write in code fences