• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Storing "0" Zero in a session as a variable

#1
[eluser]nevsie[/eluser]
I am pretty sure i know why this is occurring - but just wondered if there are any gotchas around this?

I have a form that submits a number of scored answers values 0-9. These values are then held in a session for a couple of screen where further questions are asked, until finally something is done with them at the end...

All numbers store and work fine... except "0". This gets submitted to the form, but when added in the session, and viewing the session data nothing is there. Now i assume this is because "0" is nothing, and is seen as null or false... But i need to see that "0" for scoring purposes where i add up the values.

So is there some stupid gotcha that i am not thinking about here, or is CI filtering it out on my behalf i a need to change a setting, or any obvious ways that this should be handled that i as a non programmer should really know about?

Thanks, N

EDIT
I should add that i need the "0" for referencing an array key - hence i need the "0".


Messages In This Thread
Storing "0" Zero in a session as a variable - by El Forum - 07-18-2011, 05:05 AM
Storing "0" Zero in a session as a variable - by El Forum - 07-18-2011, 05:55 AM
Storing "0" Zero in a session as a variable - by El Forum - 07-18-2011, 06:57 AM
Storing "0" Zero in a session as a variable - by El Forum - 07-18-2011, 08:12 AM
Storing "0" Zero in a session as a variable - by El Forum - 07-18-2011, 08:14 AM
Storing "0" Zero in a session as a variable - by El Forum - 07-18-2011, 09:10 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.