get_attributes(); $rentalRates = []; foreach ($attributes as $attribute) { $name = $attribute->get_name(); if ($name === "Rental Rate (Daily)") { $rentalRates["daily"] = $attribute->get_options(); } if ($name === "Rental Rate (Weekly)") { $rentalRates["weekly"] = $attribute->get_options(); } if ($name === "Rental Rate (Monthly)") { $rentalRates["monthly"] = $attribute->get_options(); } print_r($rentalRates); } echo "

yay!

"; } }