Using unserialize()


Posted on 16th Feb 2014 07:03 pm by admin

Hi there.

I have some data in my database that is serialized.

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

Issues: PHP Forms -Clearing
I've tried looking online before actually asking for help, but I've been looking for about the past

CU&UC guide
Hi Gurus,

can anybody provide me the link for CU&UC upgrade guide

Thanks i

Can php detect connection speed and thereafter swap out elements?
No code to post, lads, yet. Just looking for a yay or nay at this stage:

Can a php script be

Web Application Recipe
Hi Guys!

I am working with the Web Application recipes. I am currently working on the sen

Code Help.. If txt input box empty search X instead..
I am having a problem with my search script. At current it will simply search by a selected date whi

PHP search multiple input field box help
I am having a problem with my search script. At current it will simply search by a selected date whi

foreach loop, assistance request
I would like some guidance on the usage of foreach as I try to parse through a large database and wh

Connecion issue
Hi,

For some reason, I keep getting this error when trying to connect:

Warning: mysql_

PHP SUBMIT
Code: <input name="doLogin" type="image" src="images/loginsubmit.jpg

explode() function problem maybe
Hi I'm having trouble searching my database. When I type two words in the search field it only searc

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