473,383 Members | 1,818 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

global array

is there any concept like global array in php?if yes,please tell me its syntax.
Jun 19 '12 #1
1 1367
johny10151981
1,059 1GB
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
Jun 20 '12 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Michelle | last post by:
I am writing a web based application and need to have about 40 user defined "preferences" (variables) set and accessed as the application runs. I already created a conf.php which can be used as a...
1
by: Gregor | last post by:
I'm having problems accessing a global array variable from within a function. I have something like this: ------------------------------------ var detail = new Array( 20 ); detail = "hello"; ...
12
by: flipflop | last post by:
I need to create a global array whose dimensions depend on the contents of another global array populated at its initialisation. For example: int array1={3,2,1}; int array2]; //should be...
4
by: James N | last post by:
Here's the situation: I have 3 webforms in my project. Form 1 allows the user to select a type of report to generate. There are 2 possible type of reports, and therefore, Forms 2 and 3 are these...
1
by: Aleramo | last post by:
Hallo, i have to do a program with gsl library. I have to declare two global array cos i can't pass them to gsl functions. The problem is the size is an input from program. What can i do? I want to...
3
by: danbraund | last post by:
Hi everyone, I'm a long time C coder, who is coding his final year project in C++ to run under the MIT click routing system. Being fairly new to the OO side of the language, my problem is this: ...
8
by: ben | last post by:
hello there, oh dear, oh dear. here's a non global array of strings: char *chararray = { "abc", "defgh", "ijklmop" }; how do i do that so chararray is global? what goes in a .h file and...
10
by: Remus | last post by:
Greetings, My first time on this forum. I hope someone can help me out. I am trying to get 11 values from several different identically structured webpages. I have the list of webpages saved as...
2
by: pkjain | last post by:
As I did not have any option, I had to opt for a global array to be passed to another process thru IPC. But even before I publish it using IPC, in my process itself the values of two elements of the...
6
MrPickle
by: MrPickle | last post by:
I have a struct like so defined like so: //vector3.h struct Vector3 { float x, y, z; Vector3(); Vector3(float _x, float _y, float _z); Vector3(const Vector3 &v); };
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.