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

Lack of simpleXML Documentation
What is up with this.

Look at: http://www.php.net/manual/en/function.simplexml-load-file.php<

please help me in this update statment
hi every one

if I have table and this data in it

id name
10

Need help with a mail notify function
I was tasked with setting up a site that's been prewritten. The site is basically a form that captur

Querying info from one table based on info in another
Hi, I am currently trying to make a part for my user driven website where one user can subscribe to

A href problem under php
Hello...

I tried to explain the issue in an earlier post.. but was not clear enough....

Help! refer to a friend script with captcha code
Hi guys, I am posting on here in desperate need for some help with an ongoing search I have been doi

str_replace help
I am thinking str_replace is my only option to filter outputs from my database to convert them to sa

List/Menu Box
On an edit page when you want something to select what a user has previously selected from the datab

asking for direction
I have 2 tables in my data, which are "post" and "event"
I won't make a summa

ORA-00932: inconsistent datatypes: expected - got CLOB
SO : windows xp
database : XE

there is a table (transito) with two fields of clob

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