i have a json stored in database which looks like this

```
[{"class":"button-input btn btn-warning","name":"gorilla-preview","value":"Goat","id":"gorilla-preview"}]

```

i'm retrieving it like this

```
while($row = mysqli_fetch_assoc($res)){
          $array[] =  json_decode($row['element']);

      }
     echo "<pre>";
     print_r($array);

```

its ouput looks like this

```
Array
(
    [0] => Array
        (
            [0] => stdClass Object
                (
                    [class] => button-input btn btn-warning
                    [name] => gorilla-preview
                    [value] => Goat
                    [id] => gorilla-preview
                )

        )

)

```

**my question is:** how to get all those value in a correct format?