Jump to content


This topic is now archived and is closed to further replies.


Help in serializing from OScommerce

Recommended Posts

I use OScommerce, and the following code is the shopping cart content of a customer.
What code should I need to convert this to normal view and display in a page.
I really appreciate anyone's help.

a:2:{s:3:"qty";s:2: "72";s:11:"custom_data";
;s:10 :"color_code";s:7:"#912690";}
7:{s:4:"text";s:16:"SECOND LINE";s:9:"
"Primary Imprint Area";s:5:"image";s:32

Share this post

Link to post
Share on other sites
Well, to start, please edit your post and remove that incredibly long string from it so that we dont' have to scroll a mile to the right to view your post.

Use serialize to change your string back into an array, then you can display it back however you want.

Share this post

Link to post
Share on other sites
Hello hitman6003,
Oh my god! - Sorry for that long walk, it wasn't my intention.

I appreciate your help, but can you elaborate a little bid for me please. The point is that I don't go so deep in php, so in other words, I'm starting. I need help please.

Share this post

Link to post
Share on other sites
That string is a representation of an array. It's obtained by using the function serialize (http://www.php.net/serialize) on an array. In order to return it to it's original form, which is a very usable array, you will want to use unserialize (http://www.php.net/unserialize).

From there, you can loop through it and produce a table, or select out only certain elements for a table, or what ever you want to do with it.

Share this post

Link to post
Share on other sites


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.