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

Passing PHP variables from one page to another
Hello-

I'm having trouble figuring out how to transport a variable from one php file to anoth

mr8m - reverse document
Friends,

I'm trying to reverse a document held by MIRO, but it reports the message balan

PHP and MySQL Question/Help
I have a MySQL db with all my servers and all their details like server name, IP, OS, RAM etc etc 26

email CODING Problem
Email coding problem.

I need to send a section of the info to $tf and the same as a Cc to $em

timezone change with date()
so i put all my times for posts in my made from scratch forum(not phpbb3 or sm)
in my mysql db u

Help Import Animoto and Youtube
CAn someone help me urgently want to allow users on my website to import youtube/revver/dailymotion

Output Buffering question
Hi all,

I've been trying to wrap my head around output buffering. So far I've found tons of

Having problemswith multithreading and prime numbers
I have an assignment when I'm suppose to do the following:

Write a multithreaded Java, Pt

GET vs SUBMIT Button to show sections on one index.php page?
Just curious if one of these ways is better (i.e. more efficient) than the other.

I have a

how to easy edit text, with box? Help.
Hi.
I have a little problem. I'm doing a webpage for my aunt and I would like to make it as easy

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