Skip to content

Instantly share code, notes, and snippets.

@raihan-uddin
Created March 18, 2020 06:22
Show Gist options
  • Save raihan-uddin/35e13a4da0f4c4402d05c2109742388c to your computer and use it in GitHub Desktop.
Save raihan-uddin/35e13a4da0f4c4402d05c2109742388c to your computer and use it in GitHub Desktop.
//$months = [1 => 'Final Sale', 2 => 'Quotation'];
$months = array(1 => 'Jan.', 2 => 'Feb.', 3 => 'Mar.', 4 => 'Apr.', 5 => 'May', 6 => 'Jun.', 7 => 'Jul.', 8 => 'Aug.', 9 => 'Sep.', 10 => 'Oct.', 11 => 'Nov.', 12 => 'Dec.');
echo $form->dropDownList($model, 'month', $months, array('prompt' => 'Select'));
/* year for loop*/
$year = array();
for ($i=0; $i < 10; $i++){
$y = 2020+$i;
$year[$y] = $y;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment