Friday, August 28, 2009

Re: store array into session

Afaik you can store arrays into sessions.

The documentation says it's type String for Session->write() , but
specifies 'mixed' for Session->read() , so I'm guessing it's a
documentation glitch.

Only one way to find out ... test it :)

On Fri, Aug 28, 2009 at 11:30 AM, persianshadow<persianshadow@gmail.com> wrote:
>
> hi Melgior
>
> my website have heavy process and i searching for fast solution
>
> that store and read array .
>
> On Aug 28, 12:02 pm, Melgior <melg...@hotmail.com> wrote:
>> As a last resort, you could always use PHP's serialize and unserialize
>> functions to convert the array into a string and back. I think there
>> must be a better way to do it, but I've got no ideas about how
>> currently. If you're building a busy site, then using serialize is
>> performance wise not the best option.
>>
>> On 28 aug, 10:31, persianshadow <persiansha...@gmail.com> wrote:
>>
>> > hi
>>
>> > i want store array of ids into session but i explore API of cakephp
>> > and see  $value ( Session->write($name,$value) )
>>
>> > only get string , i need it for store id of items  that user select .
>>
>> > anybody have idea for do this ?
>>
>> > thanks
>>
>>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

No comments: