Is it possible to convert a string variable to upper case. The variable itself and not the content of the variable.
For example :-
$name = "Jam"
$data = function ?($name);
Such that $data contains "NAME". $name is passed as a variable in a function and can be $name or $game or anything. The fact of the matter is that I am trying to capitalize the variable name. Is there anyway that can be achieved in php.
strtoupper($name)
-->Output : JAM
That's not what I want I need the variable to be capitalized. I would appreciate any sort of assistance.