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

calendar dates and hours compare problem
i have a calendar in wordpress, everything works great except that i can make 2 meetings at the same

jquery validation in codeIgniter
hai i need to add client side validation to my fiels which are selected in a forloop.the fields are

Comma seperated implode & modifying returned string.
I have a PHP post form that posts up to 4 variables. I need whatever variables are passed to be comb

Function to extract email attachments using PHP IMAP
function extract_attachments($connection, $message_number) {

$attachments = array();

mySQL and PHP search
Hello,
I am trying to code a project and ran into a brick wall with one of my pages. I am pretty

query based on 2 conditions
I want to select if the doc_type is either s OR f but this doesn't work:

Code: [Select]$query

Need help with some php code :)
Hey! I'm quite new to this whole thing, so please don't fire me with shait on this one =D

I'm

"SEO" URLs
Hey, I'm wondering how to go about creating and using these types of URLs. I'm presuming it's PHP th

Need help with PHP/MySQL drop down menu
I need help on how I can implement a drop down menu which queries mysql database and output the avai

CU&UC guide
Hi Gurus,

can anybody provide me the link for CU&UC upgrade guide

Thanks i

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