Passing arrays as session variables

From: rachel (pepchick_at_gmail.com)
Date: 10/22/04


Date: 22 Oct 2004 03:47:17 -0700

Hi, I'm trying to use an array as a session variable.

First, I register the array:
if(session_is_registered("docnum")) {
        session_register("docnum");
        $_SESSION['docnum'] = array();
}

Then, I set up the variables in a while-loop:
        $SESSION["docnum"][$count] = $docn;
(I've also tried $SESSION["docnum[$count]"], but that didn't work either)

I pass the variable $count to another page, where I try to retrieve the docnum:
$docn = $_SESSION["docnum"][$count];
(again, I've also tried $SESSION["docnum[$count]"], but that doesn't work)

so... how can I do this? help!



Relevant Pages

  • Re: ICFP Contest
    ... no work when it is asked to replace the current array with the ... point to the first platter of the '0' array, ... Each register is described by a three bit ... OF op0 ENDOF ...
    (comp.lang.forth)
  • Re: ICFP Contest
    ... One distinguished array is referenced by 0 ... point to the first platter of the '0' array, ... Each register is described by a three bit ... a platter that describes a valid instruction, then the machine may Fail. ...
    (comp.lang.forth)
  • Re: Fortran by-reference, was Re: A doubly linked-list in C
    ... array start, or passing strided slices, cause a copy. ... last time I wrote code with something other than an assumed-shape array dummy arg. ... Try it with optimization turned up to a high ... passed by "inefficient copy in/out to a register". ...
    (comp.lang.fortran)
  • Re: Defect Report: Contradictory constraint on the operand of the address operator
    ... But you cannot apply the operator to a register value with array ... auto declaration. ... storage-class specifier register cannot be computed, ...
    (comp.std.c)
  • Re: Median filter in Verilog
    ... I need to sort an array of 100 points. ... Unless your clock is rather fast, ... Each register has a comparator ... each register's comparator compares ...
    (comp.lang.verilog)

Quantcast