is there any concept like global array in php?if yes,please tell me its syntax.
global array
Collapse
X
-
There is concept of global variable. you should read the link
Now, you need to understand something:
its global for the current request. no other thing. i.e. if in one file you initial your global variable you wont get that data in other page.
To share data between php pages several strategy can be followed:
1. Storing in file
2. Storing in database system
3. SESSION
well, session can be a good idea for sharing data between pages, but it might be a good idea not use for large scale data. figure your way out
Comment