Has anyone used this to get data out of PHP sessions? I can get data out using the php_unserialize function however I am getting a array of strings that looks like this: ["key1: data1","key2: data2"] I would rather get RoR session style of associative arrays ["key1"=>"data", "key2"=>"data2"] Am I just being dense and there is an easy way to do this or do I just have to deal with it? - Michael
that seems like valid yaml. try: YAML.load your_array.join("\n") irb(main):007:0> YAML.load(["key1: data1","key2: data2"].join("\n")) => {"key1"=>"data1", "key2"=>"data2"} On 8/8/05, Michael King <kingmt-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Has anyone used this to get data out of PHP sessions? > > I can get data out using the php_unserialize function however I am > getting a array of strings that looks like this: > ["key1: data1","key2: data2"] > > I would rather get RoR session style of associative arrays > ["key1"=>"data", "key2"=>"data2"] > > Am I just being dense and there is an easy way to do this or do I just > have to deal with it? > > - Michael > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > lists.rubyonrails.org/mailman/listinfo/rails >-- Tobi snowdevil.ca - Snowboards that don''t suck typo.leetsoft.com - Open source weblog engine blog.leetsoft.com - Technical weblog