473,386 Members | 1,726 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

php unserialize is not returning anything.

67
Hi friends

I am using serialize to store a multidimensional array to the db, which looks like the following on printing directly from the database

Expand|Select|Wrap|Line Numbers
  1. s:175:"a:5:{i:1;a:2:{i:0;s:4:"11~2";i:1;s:4:"61~1";}i:2;a:1:{i:0;s:4:"52~2";}i:4;a:2:{i:0;s:4:"36~1";i:1;s:4:"38~2";}i:5;a:1:{i:0;s:4:"41~1";}i:3;a:1:{i:0;s:4:"44~2";}}";
  2.  
However, when I do unserialize($the_above_value), I get nothing. Can anyone throw some light here please?

Thanks.

EDIT

I have found the error. I was serializing the data more then once ... :)
Dec 1 '07 #1
0 1139

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Chris Mosser | last post by:
I have seen on a couple posts recently, about "serializing" and "unserializing" objects. What exactly does this mean? -- Chris Mosser
3
by: Mark | last post by:
Greetings: So, I've got a real problem in that PHP doesn't seem to be able to unserialize() an array that has an element containing a newline. Of course, I've used htmlentities() to protect the...
1
by: Sebastian Aguilera | last post by:
Hi everyone. I have some troubles using the unserialize() function. I have serialized an array and that works perfect: echo '<input type="hidden" name="vardekedja" value="'.serialize($_POST...
1
by: Spam sucks | last post by:
Hello, Could somebody explane to me how i can unserialize the content of a session file, i allready reading the session files and the content now i only need to unserialize the data in the...
2
by: Andrew | last post by:
Some have suggested that using serialize() and unserialize is faster than reading/writing an array to disk as a simple text file using $array = file('numbers.txt'); Can anyone justify this? ...
7
by: richbl | last post by:
Hello all, I have a question about unserializing a single array element from a serialized array. Can this be done, or must I first unserialize the array, and then access the element? For...
6
by: sandy | last post by:
With java servlets I can declare complex object-oriented class structures as session variables in a servlet. That means I can have a complex HTML form that submits iteratively back to the server...
5
by: Mike | last post by:
I finally got serialize to work but now I cannot get unserialize to work. Here is my code. $settings = serialize($settings_array); echo "<INPUT TYPE='Hidden' NAME='settings'...
7
by: powellgg | last post by:
I've just taken over a PHP website and am converting it to ASP.NET (don't shoot!). I'm not a PHP guy so I'm doing a lot of searching for things that I aren't obvious, and I'm hoping I'll be able...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.