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

socket makes browser hang...
I have a socket server, and I am having a problem at the moment...

A browser sends a http hea

Sending CC Info by email
I am a little bit less knowledgable in the security area as most developers and I know I have a lot

If a record matches an existing record do nothing
So I don't know if I should put this here or in mysql, but what my script is for is for people to ad

how to read and write into a word document using php...?
hi,
I need,reading and writting into a word document using php.




Thank u inadva

does anyone know a php script to send mail using gmails/googles free smtp server
cause i heard u can do that but i dont know how

Intrastat Report Config in ECC 6.0 - goods Movement in EU countries
Colleagues, need ur help to understand the changes require in ECC 6 standard Report configuration se

php/xmlrpc class issue
I am working on xml-rpc in php to start with.

I have a class that only has variables defined

Using system() and bringing back the results
I am aware that you can use system() within PHP to execute system commands, but I was wondering if t

PHP MySQL Return Results Issue
Hi guys,

I'm running joomla and made a module which is using ajax.
Basically i just have a

building a function with multiple outputs
I want to build a function that has multiple outputs.

I know but am not to sure how I should

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