Reputation: 237
i want to save an array in my database and want to turn it back to in array when I output it from my database. For this I used the following code:
$string = base64_encode(serialize($_SESSION['warenkorb']));
$array = unserialize(base64_decode($zeile['b_warenkorb']));
I always get the following error:
Notice: unserialize(): Error at offset 72 of 75 bytes
I used a multidimensional array for this.
I hope someone could help me. would be nice :)
Upvotes: 0
Views: 152
Reputation: 237
The solution is, that the column length wasnt long enough. I used 200 chars, but it needed many more. Thanks @Federkun
Upvotes: 2