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

PHP FTP Can't upload Big FIles
Anyone had any success using FTP to upload a file say 90m?

im using ftp_put and it returns fa

Query issues
I probably have this setup wrong well I know I do because nothing is showing up now. What I want is

Generate multilayered array from string.
ok so i have a string that looks like this:
Code: [Select]blog:edit_all,delete_all|users:edit_all

Querying info from one table based on info in another
Hi, I am currently trying to make a part for my user driven website where one user can subscribe to

array ...
hi
Code: function formatCategories($categories, $parentId)
{
// $navCat stores all child

Converting numbers to months
The porgram works -just need the last function(month_convert_ to convert numbers to months -thanks.

Motivational Posters
Hello,

I wonder how can i do them in php. Are there any sample codes that you can show me?

How to generate a text file using php...?
Hi,
Can anyone give me code to generate a text file using php


Thanks in advance

check comment for html
hi, I just wanted to check if a comment a user posts contains HTML, and if it does, to not allow it

php form help
Hey,

I use a control file to set my meta tags and titles

Here's an example
Code: &a

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