i need to assign a global variable value by passing it in a function, something like static variable i guess. Here is my code
<?php
//this is old value
$var = "Old Value";
//need to change the value of global variable
assignNewValue($var);
echo $var;
function assignNewValue($data) {
$data = "New value";
}
?>
After the execution the value of var need to be New Value. Thanks in advance.