Answers for "php globals set"

PHP
0

php set global variables from function

<?php 
function setGlobalVariable() {
    $GLOBALS['variable_name'] = "Some Value";
}
setGlobalVariable();
echo $variable_name;
// Outputs: Some Value
Posted by: Guest on September-10-2021
0

php globals

$GLOBALS["foo"]
Posted by: Guest on October-21-2020

Browse Popular Code Answers by Language