|
|
|
#1 |
|
Messages: n/a
Hébergeur: |
Hi,
I have an array that is filled by an xml parser: $my_array[$row]["name_associative"] The content is lost when refreshing the page, obvious. How would I convert my array to a session array? (cant change the xml parser, function for other reads) Regards, Peter |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
Peter wrote:
> Hi, Hi, > $my_array[$row]["name_associative"] > How would I convert my array to a session array? this any ? foreach ($my_array as $key => $value) $_SESSION['XML'][$key] = $value; > Regards, S. |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
Sebastiaan 'CrashandDie' Lauwers wrote:
> Peter wrote: >> Hi, > > Hi, > >> $my_array[$row]["name_associative"] >> How would I convert my array to a session array? > > this any ? > > foreach ($my_array as $key => $value) > $_SESSION['XML'][$key] = $value; > Yup or serialize it first $_SESSION['XML']=serialize($array); (unserizlize on the next page) Arjen |
|
|
|
#4 |
|
Messages: n/a
Hébergeur: |
On Fri, 13 Jul 2007 12:24:24 +0200, Arjen <dont@mail.me> wrote:
> Sebastiaan 'CrashandDie' Lauwers wrote: > >> Peter wrote: >>> Hi, >> Hi, >> >>> $my_array[$row]["name_associative"] >>> How would I convert my array to a session array? >> this any ? >> foreach ($my_array as $key => $value) >> $_SESSION['XML'][$key] = $value; >> > > Yup or serialize it first Totally unnecessary. In the default session handler the data is already serialised on a save, why do it twice? -- Rik Wasmus |
|
![]() |
| Outils de la discussion | |
|
|