(10-06-2023, 01:39 AM)kenjis Wrote: In a controller or model class, variables are not global.
It is bad practice to use global variables, so there is no place to use global variables in CI4.
But if you want to use global variables, you could use because that is a PHP language feature.
You need to make it global explicitly.
There is a global in the above script (please see the link) and unfortunately it does not work after pasting in
VIEW. So what should I do to make it work? Please see this script and give me a hint.