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

CRM?
I think that's what they're called. Customer Management System? Anyway. Is there any good free ones

Help Optimizing code
Good Morning,

I wrote a small import function for a website of mine and I know there has to b

downloading a file as HTML
Hi.
I'm rather confused with forcing a download. I just want to save dynamic content (from $_SESS

How many users online in the last 24-hours using time()?
I'm fairly new to PHP. I have a MySQL table called 'users' and a field called 'loggedin' which is in

php call servlet
I have done a php backup application .
So there is a form that user pick some files to zip and d

ScriptManager History and Opera Issue
I am having an issue in opera with the ScriptManager. I have a ScriptManager on a page with history

simplexml_load_file and rss problem
Hi,

I have a problem parsing an rss feed using simplexml_load_file - this is strange as i hav

Session login issue
I'm wondering how to fix a problem I'm having with a session-based login system

Say I go to h

update the selected existing records of database
Hi frndz,
I am new to php and get stuck....

Edit.php > Update.php > Updatea

Displaying an image using echo command
I had done a query on my database, one of the fields being an image reference to a directory where a

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