|
Posted by Bocah Sableng on 04/30/07 04:28
On Apr 30, 6:20 am, dawnerd <dawn...@gmail.com> wrote:
> Hello everyone.
>
> I have a question, or problem if you will, that I'm sure someone knows
> the answer to. I have a database that stores information on a given
> user. The information is stored in a serialized array. This works
> flawlessly when using only single line text. When I tried to store
> multiline text, the problem arose.
>
> When the serialized data is deserialized, the array breaks. Any
> suggestions?
I test (on windows using CLI):
$a[] = "username";
$a[] = 15;
$a[] = "Not Found Street\n12345\nNowhere City";
$a[] = "Not Found Street\r\n12345\r\nNowhere City";
$k = serialize($a);
$u = unserialize($k);
var_dump($a);
var_dump($k);
var_dump($u);
Seems fine for me.
Please show us:
1. The content of the serialized variable before it stored to
database?
2. The content of the deserialized variable picked from database?
3. Field type you use to store serialized data?
Navigation:
[Reply to this message]
|