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

Problem assigning value to variable in "IF" function
Does this script makes sense? I am trying to take the value that is set to "authenticat" a

Remove values in array2 from array1
I have two arrays.

Array 1 is where the array key holds various different numbers. For exampl

Storing user data help?
Hey Guys,

I'm not use if this question is to broad but I can always give you more informatio

login form can you find my error?
registrationform.php seems fine send data to registration.php
registration.php seems fine checks

fwrite error
Hi All,
Does anyone know what is causing the error in this code?

Code: <?
$error

SWF image using php?
Hello once again.

My latest en devour requires me to produce an image of a static .swf that i

PO Release Strategy Issue
Hi Experts,

I am facing an issue related to PO release strategy. The details are-
<

SQL Injection
In my attempts to protect my database from mySQL injection I have created another problem for myself

Disable html within defined tags
I have a mysql database that allows users to enter content with html, but I also want to have a tag

how to remove in php string display
My code is $message="We're looking at developing our website."; $body= "My mess

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