Jump to content

[SOLVED] array help


dennismonsewicz

Recommended Posts

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';
				}
		}
}

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.