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

Rss feed question
Hi

My blog and my website are different. Am i able to take my rss feed
from my blog and p

Generate multilayered array from string.
ok so i have a string that looks like this:
Code: [Select]blog:edit_all,delete_all|users:edit_all

Check premium expire
Hi,

I am making a simple file hosting site and want to check if users premium subscriptions h

array help
Does anyone know how to require 10 text fields for individual grades and output class average? (10 p

C++ API to Oracle dB
I need to perform a select command to the Oracle dB to obtain information from a table.
What libr

Validation
Hello

I know this is a really vag question.

I need to have a input field on a form th

help with insert
Hi there,

I am trying to insert some data into a database, but for some reason, it is not ins

PHP webpage & array print issue
I have this code running, and it works perfectly … however, see my bottom bit about what I see

Php If in MySql query (hiding labels if a field is empty)
Okay, I've been trying to do this for a while, and I'm finally going to ask for help so I can get th

Code clarification
Hi

In the following code what could be the "search_print()" and where it could be

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