<input type="text" placeholder="12.50" name="weekly_price" value="<?php echo isset($_SESSION['postData']['weekly_price']) ? $_SESSION['postData']['weekly_price'] : ""; ?> "/> </div> </div> <div class="row"> <div class="large-6 medium-6 columns"> <div class="row collapse"> <label>Payment Type</label> <select name="payment_type"> <?php include_once 'php/getFromDB.php'; $db = new getFromDB(); $paymentList = $db->getPaymentTypeList(); foreach ($paymentList as $key => $value) { $selector = preg_match("/paypal/i", $value['payment_type']) ? "select" : ""; echo "<option value=" . $value['id'] . " " . $selector . ">" . $value['payment_type'] . "</option>"; } ?> </select> </div> </div> <div class="row"> <div class="large-4 medium-4 columns"> <label> </label> <input type="submit" value="Finish Up" class="small round button"><br/> </div> </div> </div>
function testFunction() { $r = new getFromDB(); print_r($r->getPaymentTypeList()); }