Jump to content


Photo

can an array be a session variable??


  • Please log in to reply
1 reply to this topic

#1 markbett

markbett
  • Members
  • PipPipPip
  • Advanced Member
  • 133 posts

Posted 17 September 2006 - 02:54 AM

im trying the code
while($i<=$guests){
				$guest_array[$i] = array(${guest_name.$i}, ${guest_email.$i});
				$i++;
			}
			$_SESSION[guest_array] = $guest_array; // we make the array a seesion variable
			
					echo $_SESSION[guest_array][1][0];
and its not working... just wondering if it is because a session variable cannot be an array

#2 markbett

markbett
  • Members
  • PipPipPip
  • Advanced Member
  • 133 posts

Posted 17 September 2006 - 03:15 AM

doh im stupid... i forget to reset my counter so nothing was ever put in my array




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users