Php arrays and strings are converted to each other. The data structure is the same as a function used to describe PHP Data. The returned value is a string. Sometimes, in order to convert some data into strings, we hope to keep the original data structure and content. This function is required. $ A = array ('data' = & gt; "hi", 123); $ convert arrays and strings with the same data structure
A function that describes PHP Data. The returned value is a string. Sometimes, in order to convert some data into strings, we hope to keep the original data structure and content. This function is required.
$ A = array ('data' => "hi", 123 );
$ B = serialize ($ a); // serialize the array
Echo $ B ;? // This is the described array, but it is a string here.
$ C = unserialize ($ B); // restore the described data (deserialization)
Print_r ($ c );?? // Restore to $ a, and the array structure is not lost.