KevinM1 Posted August 13, 2009 Share Posted August 13, 2009 Try it without the short tags, i.e.: <?php echo $buildTable; ?> Quote Link to comment https://forums.phpfreaks.com/topic/170125-solved-array-help/page/2/#findComment-897562 Share on other sites More sharing options...
dennismonsewicz Posted August 13, 2009 Author Share Posted August 13, 2009 I actually just figured it out! Here is the updated code: $modOne = $_POST['modelone']; $modTwo = $_POST['modeltwo']; $modThree = $_POST['modelthree']; $array = array($modOne, $modTwo, $modThree); foreach($array as $r) { $man_db = JFactory::getDBO(); $v = mysql_real_escape_string($r); $man_db->setQuery("SELECT * FROM tblName WHERE model = '$v'"); $man_rows = $man_db->loadObjectList(); foreach($man_rows as $row) { $ded = $row->deductible; $deduct[] = $ded; if($ded == '89.99') { $prem[] = '6.00'; } elseif($ded == '39.99') { $prem[] = '4.49'; } } } Quote Link to comment https://forums.phpfreaks.com/topic/170125-solved-array-help/page/2/#findComment-897584 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.