I get the result from my database i this type of array format.Now i want to print the question,answer and category name from the array what I do?

```
<?php  $v1 = '';
    foreach($var as $data){ 

 ?> 
<div class="faqHeader"> <?php echo $data['category_name'];?> </div>             
    <div class="panel-group" id="<?php echo $data->title;?>">

```

I tried these cod but not get the answer.In $var i get the all the array value 

[![enter image description here](https://i.stack.imgur.com/GzLys.png)](https://i.stack.imgur.com/GzLys.png)