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

Question about the upload of large files
Hi there,

I have a question about the upload of large files, like videos (files generally abo

Parse Error Help
Hello, I got the parse error "Parse error: syntax error, unexpected ',' in register.php on line

preg_replace question
Hello!!

I hope someone can help me with preg_replace.

I load two tables from an extern

string to currency format
Hi guys...

Actually I chunk out some data from txtfile and one of the data contains amount va

Warning: Cannot modify header information - headers already sent by (output sta
Warning: Cannot modify header information - headers already sent by (output started at /home/praylif

How to make URL loads only on login
On my page, when a user login he's redirects to user_home.php. I made it also to open the chat scree

Collecting AOL Search Terms
I am attempting to collect AOL search terms. I know the code is correct (it works for google, bing,

Which PHP-Editor do you think is the best?
Hi everyone,
Myself Brian Anderson. For the last 2 years i have been working a

Blank record injected into database
I always found several blank records inside my database, although $SESSION is required to insert the

send() and recv() parameters confusion
On server Side:
int recv (Socket,Buffer, Length, Flags)
On Client Side:
int send (Soc

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