How do I save data from a given field as an array in the database and then print it?

#1

I have a table with two products:

Array
(
    [3] => Array
        (
            [1] => 12
            [2] => 4
            [3] => 3
        )

    [5] => Array
        (
            [1] => 12
            [2] => 1
        )

)

How do I save the array in the database and then print it in the following way:

[1] - 12 бр.
[2]- 4 бр.
[3] - 3 бр.

[1] - 12 бр.
[2] - 1 бр.
"color" - "quantity"
[1] - 12 бр.
#2

I swear I have been over this recently…

#3

I found how to do it … I used serialize () and unserialize (). the good thing is that it allows you to record accurately and then bring it the same

#4

No you didn’t. Lets start with posting the actual tables and how you are coming up with the array along with a description of the real problem you are trying to solve instead of your attempt at solving it.

#5

Your question is not clear. Please explain me more. What is your issue?