<?php foreach ($model as $m) { ?> <tr> <td> <?php $customer = app\models\Customers::findOne($m->idCustomer); ?> <?php echo $customer->firstname . " " . $customer->lastname; ?> </td> <td class="container-td"> <table cellpading="0" cellspacing="0"> <?php $booked_items = app\models\Bookingitems::find()->where(['idBooking' => $m->id])->all(); ?> <?php $price = 0; foreach ($booked_items as $bi) { ?> <?php $item = app\models\Items::findOne($bi->idItem); ?> <tr> <td><?php echo $item->name . " " . $item->dimensions; ?> </td> <td><?php echo $bi->quantity;