Strange array data when trying to output data from database


Has anyone ever got array data like this?

All I did is this:

In the site controller


    public function actionIndex()





        return $this->render('index', [

            'sectionone' => $sectionone,






My table is sectionone

and would like to output all the columns from that table. I tried multiple queries and same output each time.

In the index view:

   <a class="page-scroll" href="#LINK1"><?php var_dump($sectionone); ?></a>

Why would my query returns this please?


It is not strange at all - it returns a query object.

Use ‘findOne’ instead of ‘find’ and access the fields like this:

<?= $sectionone->id ?>

<?= $sectionone->another_field ?>

Thank you so much master Jacmoe ::).