How to save an Array variable as a regular database value?
PHP offers the serialize() function, that creates a representation of the variable that can be stored everywhere. This can be used for other types of variables as well, but it is most common for Array.
myqsl_query(“INSERT INTO table_name(column_name) VALUES(“.serialize($array_variable).”)”);
To return the value, we can use the unserialize() function, for the serialized object.