My problem is very basic.
I did not find any example to meet my needs as to what exactly serialize()
and unserialize()
mean in php? They ju
Most storage mediums can store string types. They can not directly store a PHP data structure such as an array or object, and they shouldn't, as that would couple the data storage medium with PHP.
Instead, serialize()
allows you to store one of these structs as a string. It can be de-serialised from its string representation with unserialize()
.
If you are familiar with json_encode()
and json_decode()
(and JSON in general), the concept is similar.