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

Format String help
I have a textbox where a person enters an application number. the application number is 10 characte

error checking breaking my code
Hi there, OK first of all, big apologies for what I assume is really fundamental errors in the struc

Displaying values from a SQL count...
Hi,
Easy enough question i just forget the exact method ..
I have ...

Code: //count win

HTML Email rec'd as Source Code
The code does create and send the email successfully. However, the message shows as html code and n

empty() error
Why does

Code: empty($USER_ID = $_SESSION["USER_ID"])
create this error...

Print out contents of to Excel
I have got this script that gathers all the data that I need but I need it to send it to excel inste

for some reason mysql query not working, not inserting, please check it out
This code is not inserting anything into my db, don't know why, the $_SESSION variable does contain

How to change Time Zone
HI
I want to change the time zone of the server to another country.How can do that?

Thanks

Connect to database that isn't localhost
I am currently doing a small script for a company that doesn't have mySql support on there hosting.

How to calculate days from variable date?
This will be easy for one of you gurus. I want to fetch the date from a variable date, for example:<

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