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

Perplexing problem showing a .jpg
Please disregard..........I figured it out

please help me in this update statment
hi every one

if I have table and this data in it

id name
10

Displaying a clickable playername
I am going wrong somewhere with the mysql_query, can someone please put me straight?

$playern

IS Retail & Manufacturing
Hi

Can IS Retail and Manufacturing activities be done in same instance ie. in same client

sendmail code suddenly not working
Hi Guys, I maintain 3 sites (including my own) I use the following code from a french webmaster that

Online Event Ticket Sales
Has anyone wrote a script for online tickets sales?

I have been googling and found lots of th

SCRIPT ERROR
Here is the CONTACT FORM I made for our website:

<form id="form1" name="

EU VAT Package 2010
Does any one know whether SAP will be developing new reporting functionality due the new VAT rules t

How can I Compare two xml documents?
Hi all,

I am doing a POC for my project and I am using XE database 10g version.

Get Total From While Loop
I'm trying to get the total for each product and add them for a Grand Total to list outside the loop

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