note 94190 added to function.unserialize

From: Date: Wed, 21 Oct 2009 16:57:21 +0000
Subject: note 94190 added to function.unserialize
Groups: php.notes 
Request: Send a blank email to php-notes+get-161950@lists.php.net to get a copy of this message
To avoid data loss (problem with '\r\n') you can convert string to array and serialize an array. Example: <?php //Store data: $array = explode('\r\n', $string); $serialized = serialize($array); //Restore data: $array = unserialize($serialized); $text = implode('\r\n', $array); ?> ---- Server IP: 69.147.83.197 Probable Submitter: 93.72.240.176 ---- Manual Page -- http://www.php.net/manual/en/function.unserialize.php Edit -- https://master.php.net/note/edit/94190 Del: integrated -- https://master.php.net/note/delete/94190/integrated Del: useless -- https://master.php.net/note/delete/94190/useless Del: bad code -- https://master.php.net/note/delete/94190/bad+code Del: spam -- https://master.php.net/note/delete/94190/spam Del: non-english -- https://master.php.net/note/delete/94190/non-english Del: in docs -- https://master.php.net/note/delete/94190/in+docs Del: other reasons-- https://master.php.net/note/delete/94190 Reject -- https://master.php.net/note/reject/94190 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#161950) next »