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

Query failed issue with php script but works fine in mssql manager!
hi i have the script below which copies data from one table to another but will only insert new data

What makes a script your own?
If someone finds a login script online, and changes some variable names around and some other minor

foreach result into a single variable
Hi,

I have this code...

Code: [Select]foreach ($_POST['Interests'] as $interest =&

Inserting the current date/time while submitting the forum
What do I need to add below to update the current date/time? I have a field in the database called d

login page does not execute a else statement
I've created a login page using sessions.
When an incorrect user name or password is entered then

How to file_get_contents when login required?
Hello!

I am trying to read data from a page that you have to be logged into to view, I am try

OPINIONS WANTED
This is my login page code, and I want your opinion on it please!

Code: // Login ~ CHECKS

default SAP userid
hi,, I just like to know if it is ok to use the default SAP user id (SAP*)?

start new row of pictures
on my site www.budstreasureauctions.com there is a featured auctions box that users will pay to get

help with image text
Hi ...

see i need the text of the name and number to start in the center and always be in the

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