php - An Array written in top of dropdown in magento -


i adding select field in form , getting available records database, slight problem there written array in top of drop down, want remove it.

foreach ($data $columns) {                      $datacol[] = array(                   "value"    =>  $columns->getcatid(),                   "label"    =>  $columns->getcategory(),);                      }     /* category */     $fieldset->addfield('cat_id', 'select', array(           'label'     => mage::helper('news')->__('category'),           'class'     => 'required-entry',           'required'  => true,           'name'      => 'cat_id',       'values'    =>        array(             array(             'value' => $datacol,              'label'     => mage::helper('news')->__($datacol),             ),  )        )); 


Comments

Popular posts from this blog

html5 - What is breaking my page when printing? -

c# - must be a non-abstract type with a public parameterless constructor in redis -

ajax - PHP/JSON Login script (Twitter style) not setting sessions -