/** * @param $suburbName * @return bool|int|string * Get the area of given suburb */ public static function getArea($suburbName) { $suburb = Suburb::get_one('Suburb', "Name = '{$suburbName}'"); if ($suburb) { return $suburb->area(); } return false; }
</label> </div> <div class="form-group"> <label>Rating <input id="rating" name="rating" value="<?php echo $originalOption->Rating; ?> " type="number" class="rating" min=0 max=5 step=1 data-size="xs" > </label> </div> <div class="form-group"> <label>Suburb</label> <select class="form-control" name="suburb" id="suburb"> <?php $suburb = new Suburb($db); $stmt = $suburb->selectAll(); while ($row_suburb = $stmt->fetch(PDO::FETCH_ASSOC)) { extract($row_suburb); if ($originalOption->Suburb_Id == $Id) { echo "<option value='{$Id}' selected='selected'>{$Suburb} {$Postcode}</option>"; } else { echo "<option value='{$Id}'>{$Suburb} {$Postcode}</option>"; } } ?> </select> </div> </div> <div class="modal-footer">