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

Facebook status update API
Hello,

So, I'm trying to create my first Facebook application with PHP.

Basic ideas fo

highlighting search terms
well, I started this in the regular PHP section, but it no longer fits there. Suffice it to say, I'm

Issue Parsing XML into table
Hello all,

Im a bit new to php and new to phpfreaks. But thanks in advance for the help!
<

Query issues
I probably have this setup wrong well I know I do because nothing is showing up now. What I want is

php is not recognized as an internal or external command
Hello,

I am trying to bake the code in CakePHP through my console.
I have changed my Path

I didnt code this but I need help with it
I'm sorry. i'm not a coder. I have this script for forcing download and previewing mp3. The guy that

user administration
Dear @all,

what I have to do to set the user defaults for new users. At the moment I woul

PHP and Javascript
Hi Guys,

Im trying to load the contents of an html file into a text area for editing, this is

Batch update record with Pagination
Hoping someone can help me with this issue I'm having, im trying to batch update records from a resu

Month String to Numeric?
Hi guys,

Given a month as a string, is there a simple way to find the numeric representation

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