Welcome Guest, Not a member yet? Register   Sign In
creating a structure
#4

(03-08-2022, 06:27 AM)richb201 Wrote: I am creating the gtm_data struct in the main controller with $gtm_data = new stdClass();
How can I just declare gtm_data as a Global so every module has access to it?

$gtm_data is not a struct, because PHP does not have structs.
$gtm_data is an object.

And it is recommended not to use global variables.
Why don't you pass $gtm_data to the model?
Reply


Messages In This Thread
creating a structure - by richb201 - 03-07-2022, 01:17 PM
RE: creating a structure - by ikesela - 03-08-2022, 12:44 AM
RE: creating a structure - by richb201 - 03-08-2022, 06:27 AM
RE: creating a structure - by kenjis - 03-08-2022, 07:05 PM



Theme © iAndrew 2016 - Forum software by © MyBB