خرید بک لینک

Vote count: 0

I am having a hard time wrapping my head around something that seems simple. I am checking for features associated with a product in my table of products. Then I want to output the features for all the products associated with each store. The problem is when I do a while loop inside my foreach I end up with multiple outputs of the same feature (I only want to list each feature once)

foreach($facilities as $facility){
    while($rates->loop_all()){
        $feat_arr = $rates->get_features_as_array();
        If(($feat_arr['bubbles']) == TRUE){
            $bubvar = 'bubbles'; 
        }else{
            $bubvar = '';
        }
        If(($feat_arr['suds']) == TRUE){
            $sudvar = 'suds'; 
        }else{
            $sudvar = '';
        }
    }
    echo $bubvar;
    echo $sudvar;
}

My result is the first product lists the correct features but after that the other products to not echo the variables.

asked 2 mins ago

برچسب: نویسنده: استخدام کار تاريخ: چهارشنبه 13 مرداد 1395 ساعت: 8:45

صفحه بندی