how to display array in div structure in drupal 7?
After a research of 20 minutes, I came to this answer.theme('item_list', array('items' =&gt; $output)); This function follows a simple array key value structure.It doesn't support multiple idexes. so remove $i from array, and it will work.