Re: Problem When Serializing Array With Multiline Text
- From: Bocah Sableng <cahsableng@xxxxxxxxx>
- Date: 29 Apr 2007 21:28:01 -0700
On Apr 30, 6:20 am, dawnerd <dawn...@xxxxxxxxx> 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?
.
- References:
- Problem When Serializing Array With Multiline Text
- From: dawnerd
- Problem When Serializing Array With Multiline Text
- Prev by Date: Re: help on include
- Next by Date: Re: SQLite3 and PHP
- Previous by thread: Re: Problem When Serializing Array With Multiline Text
- Next by thread: Re: Problem When Serializing Array With Multiline Text
- Index(es):
Relevant Pages
|