Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

accessing session arrays

Status
Not open for further replies.

Bastien

Programmer
May 29, 2000
1,683
CA
Hi All,

Question: when accessing a session variable array, how can I write it?

is the correcnt syntax
Code:
for($x=0;$x<$_SESSION['numbooths'];$x++;){
	print &quot;Booth #:&quot;.$_SESSION['booths'][$x];
}

or
Code:
for($x=0;$x<$_SESSION['numbooths'];$x++;){
               print &quot;Booth #:&quot;.$booths[$x];
}

TIA Bastien

There are many ways to skin this cat,
but it still tastes like chicken
 
The first one would be the preferred one, though the second would work if register_globals is on. //Daniel
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top