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

Reduce redundancies in switch functions?
Hello all! I somewhat new to PHP, and was wondering if anyone could give some suggestions on a swit

help with contest script
I would like to code a contest script to my site but i don't know how. Could someone just give me pu

Socket programming
Hello all,

I have a PHP socket script. GPS trackers connect to this socket. IMEI verification

Need Help with a query
Hello,
For some reason I am just not getting the right answer when I do this query and not quite

Multi image upload
I have a gallery to build and want to build a dynamic upload form to allow for $var number of fields

Need help making a script that moves data into acrhive table
Hi,

I'm kinda new to php/mysql

And i wrote a simple script to store sales lead for a b

Contact Form Not Working When I Add Validation Codes
So I built my first working PHP "Contact Us" like form. But, I have been trying to now mak

Price in PR
Dear Experts,
Why we have to enter the price in the PR, and why there is no free goods indicato

login page does not execute a else statement
I've created a login page using sessions.
When an incorrect user name or password is entered then

Java API in PHP?
I have an application that we use internally here at the office.

The software company provide

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