Re: store array into session
hi Nancy yes :) . i test this and understand that we can store array into session :). thanks for your reply. On Aug 31, 8:25 pm, Nancy nancy.milli...@gmail.com wrote: Have you tried it? It does store it as a string but seems to recreate it as an array when you read it back in. At least, I tried it yesterday and it seemed to do the right thing. On Aug 28, 1:31 am, 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: store array into session
Have you tried it? It does store it as a string but seems to recreate it as an array when you read it back in. At least, I tried it yesterday and it seemed to do the right thing. On Aug 28, 1:31 am, 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: store array into session
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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: store array into session
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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
store array into session
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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
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, persianshadowpersiansha...@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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---