special characters in array
Posted: Tue Jul 29, 2008 8:25 am
Hi,
I am trying to store some plain text in a serialized array that will be stored in a database.
The string i'm trying to store in an array may contain appostraphes, back slashes - anaything really.
How can I store these characters in a serialized array?
I've tried
htmlentities($str, ENT_QUOTES),
addslashes($str)
they are implementing their function but i am unable to retrieve the string from the array.
I have also unserialized the array - just in case you're wondering.
Any ideas?
I am trying to store some plain text in a serialized array that will be stored in a database.
The string i'm trying to store in an array may contain appostraphes, back slashes - anaything really.
How can I store these characters in a serialized array?
I've tried
htmlentities($str, ENT_QUOTES),
addslashes($str)
they are implementing their function but i am unable to retrieve the string from the array.
I have also unserialized the array - just in case you're wondering.
Any ideas?