i'm trying to implode an array using:
$implode_keys = implode(',', array_values($arr)
$implode_values = implode(',', array_keys($arr)
i'm trying to implode an array using:
$implode_keys = implode(',', array_values($arr)
$implode_values = implode(',', array_keys($arr)
serialize
the array (or array of arrays). That's what serialization is intended for. When you need it back as an array (or array of arrays)... just unserialize
it.
For future generations... serialization flattens out a data structure, such as an array, so that it may be stored in a simplified fashion, such as in a database.
Maybe you can try json_encode() to save it to text field, if that is some very static data using only to read data once it is inserted (if you won't use Ordering, finding by some of array $var or similar), or if is(will be) very small table.