session array

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Gecke Rün

    session array

    hi all,

    Can I thread a session as an array and do:

    for ($i=0; $i<$this->aantalStemme n; $i++)
    $_SESSION['stem'][$i] = NULL;

    regards
    Stijn



  • Stefan Hegenbart

    #2
    Re: session array

    Gecke Rün wrote:
    [color=blue]
    > hi all,
    >
    > Can I thread a session as an array and do:
    >
    > for ($i=0; $i<$this->aantalStemme n; $i++)
    > $_SESSION['stem'][$i] = NULL;
    >
    > regards
    > Stijn
    >
    >
    >[/color]
    of course you can.

    a session variable may also be an array!

    like:
    $_SESSION['var'] = array();
    $_SESSION['var'][] = 'new value';

    regards,
    sh

    --
    "The goal of Computer Science is to build something that will last at
    least until we've finished building it." -- unknown

    Comment

    • Tim Van Wassenhove

      #3
      Re: session array

      In article <415ada08$0$116 93$ba620e4c@new s.skynet.be>, Gecke Rün wrote:[color=blue]
      > hi all,
      >
      > Can I thread a session as an array and do:
      >
      > for ($i=0; $i<$this->aantalStemme n; $i++)
      > $_SESSION['stem'][$i] = NULL;[/color]

      don't know what you are trying to do,

      meaby unset($_SESSION['stem'][$i]);


      --
      Tim Van Wassenhove <http://www.timvw.info>

      Comment

      Working...