So. I have three massive texts from WYSIWYG editor that I need to store in DB (MySQL). To do that I use PHP function rawurlencode()
put them in one array and serialize()
the array, then insert into DB. But the problem is when I need to rawurldecode()
.
First I unserialize()
then text decodes normally, but image tag decodes like this:
`<img alt="\"\"" src="\"/ckfinder/userfiles/images/facebook.PNG\""
style="\"float:right;" height:200px; width:198px\">`
there is multiple these ->\"
that I dont need and in fact they don't appear in code that is not encoded. str_replace()
won't help.
Maybe I do something wrong and there is better way how to store long texts in serialized array?