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

Word Trimming
Hi Guys & Gals!!

Hope you are all ok....

I need some help with the following

Target costs on Process orders not calculating
Hi All,

We have released standard costs for all the materials. We have also done Goods r

Recognising Revenue daily
Hello.
Has anyone come across daily recognition of deferred income?
We want to implement R

Inserting the current date/time while submitting the forum
What do I need to add below to update the current date/time? I have a field in the database called d

Trouble with a select list
Hello All!
I was wondering if any of you guys could help me with a small problem I'm having!

how do i display data on a page from mysql
1 - do i use this code at the top of each of my page i wish to only alow access if there as been a s

PHP4 to PHP5 Conversion
Hi Everyone,

I am working on a site that is built up on PHP4 and each page is being started f

problems with php variables in mysql query
i can't seem to get the following query to work.

select $q1c from $vote_rate where id = $re

change text color with a jQuery code
Hihow can I change the text in a asp:TextBox to a different color when I start typing using jQuery?I

XML Grouping
I'm using xml_parse_into_struct to get all my elements, but now I need to group them. For example, h

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