php - Declare global array in codeigniter to access between different functions -
i want declare global variable in model , use accordingly.
syntax below example how want use it, may not proper syntax. want know proper syntax implement.
global $stddata
call 1st function via ajax:
add array of data global variable.
global $stddata = array(1=>"a",2=>"b");
after user triggers event call 2nd function via ajax:
access array stored in global variable above.
echo $stddata
your question similar :
code igniter - best place declare global variable
or how declare global variable in codeigniter 2.2?
try this, might solution.
Comments
Post a Comment