I tried to put an array into a session, but I can get it to work... here is 
my code:

<pre>
                if(!isset($script_total_time))
                {
                        $script_total_time=(float)$total_time;
                        session_register("script_total_time");
                        $step_times_array[$step]=$total_time;
                        $step_times=serialize($step_times_array);
                        //echo "step_times=\"$step_times\"";
                        //this when not commented, echoes perfectly the string with 
the 
serialized array...
                        session_register("step_times");
                        //so why doesn't it work if $step_times is in fact a string?
                }
                else
                {
                        $script_total_time+=(float)$total_time;
                        $step_times_array=unserialize($step_times);
                        $step_times_array[$step]=$total_time;
                        $step_times=serialize($step_times_array);
                }
</pre>

the variable $script_total_time works like a charm, and it also updates 
perfectly, but the step_times array simply doesn't work... I looked into 
the session-cookie-file and the step_times is set but as empty... I don't 
get what is wrong... For the record this is a code from a script which have 
several steps, all reloads of the same .php file and I want to store the 
execution times for each step (step_times) and the total running time 
(already working)...
____________________________
. Christian Dechery (lemming)
. http://www.tanamesa.com.br
. Gaita-L Owner / Web Developer


-- 
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