There is something wrong with this foreach.
The last value from $myregions is not picked up but has again the second value 'georgia':

<?php 
     $myregions = array('florida','georgia','delaware');
     foreach ($myregions as $value) {
        myfunction(array('region'=>$value)) ;
        if(count_items()>1) {
            if(has_items()){           
                draw_item($class);
            } 
        } 
     }    
?>

Recommended Answers

if(count_items()>1)

Could it be that line?

Jump to Post

All 2 Replies

if(count_items()>1)

Could it be that line?

no that is just to see if there are items from the query.
When I echo $value I get the good results.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.