$personId = $seller['person_id']; $person = $personCon->getPerson($personId); if ($person->errorInfo()[2] == null) { $person = $person->fetch(); $personCount = count($person); if ($personCount > 0) { $firstName = $person['first_name']; $surname = $person['surname']; $sellerName = $firstName . ' ' . $surname; $car = $carCon->getCar($carId); if ($car->errorInfo()[2] == null) { $car = $car->fetch(); $carCount = count($car); if ($carCount > 0) { $carRego = $car['rego_number']; $medias = $mediaCon->getMediaForOffer($offerId); if ($medias->errorInfo()[2] == null) { $mediaResults = $medias->fetchAll(); $mediaCount = count($mediaResults); if ($mediaCount > 0) { foreach ($mediaResults as $image) { $media[] = $image; } } } $fos = $foCon->getFeaturesForOffer($offerId); if ($fos->errorInfo()[2] == null) { $fos = $fos->fetchAll(); $foCount = count($fos); if ($foCount > 0) { foreach ($fos as $fo) {
<th>Make</th> <th>Model</th> <th>Engine</th> <th>Price (AUD)</th> </tr> </thead> <tbody> <?php foreach ($offers as $offer) { $car = $carCon->getCar($offer['car_id']); $car = $car->fetch(); $model = $modelCon->getModel($car['model_id']); $model = $model->fetch(); $make = $makeCon->getMake($model['make_id']); $make = $make->fetch(); $media = $mediaCon->getMediaForOffer($offer['offer_id']); $media = $media->fetch(); ?> <tr> <td><img src="<?php echo $media['file_path']; ?> " width="250" class="img-responsive" alt="Generic placeholder thumbnail"></td> <td><?php echo $make['make_name']; ?> </td> <td><?php echo $model['model_name']; ?> </td>