Using unserialize()


Posted on 16th Feb 2014 07:03 pm by admin

Hi there.

I have some data in my database that is serialized.

Did you know?Explore Trending and Topic pages for more stories like this.
e.g.

a:2:{i:0;s:9:"Test";i:1;s:4:"Another Test";}

I'm unsure how to use unserialize to convert it into a string in the format:

Test, Another Test

Currently I have:

Code: $radio_array = unserialize($radio);
foreach ($radio_array as $i => $value) {
print($radio_array[$i]);
}

But that throws errors. Any help appreciated, thanks
No comments posted yet

Your Answer:

Login to answer
198 Like 9 Dislike
Previous forums Next forums
Other forums

gather checkbox data from form into email
Hello all,

First, i'd like to thank everyone who responded to my previous posts regarding set

HTML Form Server Side Validation
Hi, Im new here, im currently doing a website for a friend, and I have designed using snippets from

What are the two different files you download to update kernel?
What are the two different files you download to update kernel?

Passing Variables
What I'm wanting to do is when the user clicks on Arenas it will know the name of the country it's w

Schedule editor
Hi,

I have a question related to Schedule editor.
If we schedule a BLS for every 30

need help modifying script
Hi guys,

I'm fairly new to php and am having a bit of trouble modifying a script.

This

links using header()
Hi All

I'm not sure where to ask for help on this but I hope someone can offer some. I'm at

Redirecting Admin
In my members table, I have a field called "perm" and it's set to zero for all members. Ho

Two fgetcsv related questions ;D
First of im trying to get a file from a merchants server but the directory is protected, I know the

string to currency format
Hi guys...

Actually I chunk out some data from txtfile and one of the data contains amount va

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash