Justtechjobs.com Find a programming school near you






Online Campus Both


php-general | 2001122

Re: [PHP] array in sessions From: Nick Winfield (pioneer <email protected>)
Date: 12/17/01

On Tue, 18 Dec 2001, Gregor Jaksa wrote:

> Hello,
>
> is it possible to register array in session .. something like that:
> session_register("ex_array[field1]");
> session_register("ex_array[field2]");
>
> this example of course doesnt work :), so if anyone knows a solution, plz
> tell

Why not just store the whole array, like this ::

<?php
session_start();
session_register("sports");
$sports = array("tennis", "soccer", "hockey", "basketball");
?>

Cheers,

Nick Winfield - [ http://www.pi0.org/ ]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe <email protected>
For additional commands, e-mail: php-general-help <email protected>
To contact the list administrators, e-mail: php-list-admin <email protected>