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

button help
i originally had this but realised it is much easier to have a button.

Code: <?php

cURL Upload Help
OK, I am creating a bridge from a local program to my website and I am trying to find the best way t

What is SAP Avatar ?
Hi All,

This G.Satish , my boss asked me to explore on SAP Avatar. I searced in internet

filesize() returns 0
I have a socket program that runs in an infinite loop, listening for connections, in this socket I h

Not loading image
When this function gets loaded it doesn't load the image just trying to figure out why.

Code:

multiple recipients + dbuser mail recall
Hello,

I am building a php login script.

When the user registers the script will send

php + mysql count consecutive data
I have a database of values and I want to work out how to display them if the values match a consecu

Forgot password won't work
My forgot password thing is not working properly. It is giving me this errorMailbox unavailable. The

Just wondering what you think about my site
I am new to phpfreaks i just seen this form and thought it would be cool to see what other thought a

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

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