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

Help please - How to validate from 2 possible answers
Hi

I hope somebody can help me with what will probably be really simple, I'm pulling my hair

Handling text changed in text box control using Ajax
I need to create a web form with a text box control. When someone types text into the textbox I nee

my two tables
table1 : col1 = topicid , col2 = topic

table2 : col1 = sentid, col2 = sentence

Cod

RSS feed - FeedList for WordPress
Hi,

I'm trying to alter the FeedList plugin for WordPress so that I can click on the title of

newbie question about multiple queries
hi everyone,
I'm sorry to ask such a basic question, but I'm young and trying to learn php on my

To add a field on the screen XK02.
Hi All,

How to add an additional field in the vendor change control screen XK02.
The

File upload issues
Hi Guys,

Can anyone see any issues with this code:
Code: $setImage= 'productimages/' . dat

Unidentified index error in a simple form
I have been trying to make an HTML form that is handled by a PHP script. So far my attempts to get i

date("now") prints out wrong date ?
Hi Guys
Anyone know why and how I can fix it ?

Mysterious Timeouts
I've deployed a few simple AJAX-enabled web page to a local server that is accessed through the Inte

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