public function getSpecialtyOption(){
        return array("influencer"=>"Influencer","trickster"=>"Trickster","juice-reviewer"=>"Juice Reviewer","other"=>"Other","model"=>"Model");
    }

output array

  echo "<pre>";
  print_r(Mage::helper('affiliateplus')->getSpecialtyOption());
  echo " ";
Array
(
    [influencer] => Influencer
    [trickster] => Trickster
    [juice-reviewer] => Juice Reviewer
    [other] => Other
    [model] => Model
)
public function getSpecialtyOptions(){
        
    $options =  array();
    $specialoties = $this->getSpecialtyOption();
 
    foreach($specialoties as $value => $label){
        $options[] = array('value' => $value, 'label' => $label);
    }
    return $options;
   
}

output array

  echo "<pre>";
  print_r(Mage::helper('affiliateplus')->getSpecialtyOptions());
  echo " ";
Array
(
    [0] => Array
        (
            [value] => influencer
            [label] => Influencer
        )
    [1] => Array
        (
            [value] => trickster
            [label] => Trickster
        )
    [2] => Array
        (
            [value] => juice-reviewer
            [label] => Juice Reviewer
        )
    [3] => Array
        (
            [value] => other
            [label] => Other
        )
    [4] => Array
        (
            [value] => model
            [label] => Model
        )
)


Categories: Magento

0 Comments

Leave a Reply

Avatar placeholder

Your email address will not be published. Required fields are marked *