Dl Neil wrote:

> The global array is being defined in the mainline, but not populated. What happens 
>if you set element 0 to some
> value (to take up some storage space first) and then try the switched function calls?

This did not produce the desired result, unfortunately. The array is filled correctly 
within the first function,
but is empty after we've passed the switch statement en route to the second function.

> When you say "Alas, this also emptied the array each time I went from one function 
>to another via the switch
> statement." do you mean that the array definition line is inside the same loop that 
>causes the switch statement
> to be revisited?
> (it shouldn't be - put it right at the beginning of the 'mainline' and ensure that 
>it is not re-executed (which
> would indeed 'reset' the values))

The array definition line was not inside the same loop as the switch, which it looked 
like of course because there
was a reset at some point, it seemed.

Henriks answer at 23:17 seems to have hit the nail in the head: each time the variable 
$action is changed (using a
FORM), this causes the switch statement to run another function, but this also creates 
a new instance of the
script, in which the variables from the older instance are not known.

I'm now working on a solution that uses the same form to pass on some data I need. A 
bit complex maybe, but I'll
leave the code cleaning for version 2.0 of my software :)
Imar de Vries - [EMAIL PROTECTED] - ICQ 6972439

PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to