Skip to content

Instantly share code, notes, and snippets.

@taleeb35
Created September 23, 2014 16:26
Show Gist options
  • Save taleeb35/a1ca2ef7dc5214e72f0d to your computer and use it in GitHub Desktop.
Save taleeb35/a1ca2ef7dc5214e72f0d to your computer and use it in GitHub Desktop.
<?php echo $this->Form->input('day_of_week',array('type' => 'select','options' => array(
'1' => 'Monday', 'Tuesday' => 'Tuesday','Wednesday' => 'Wednesday','Thursday' => 'Thursday',
'Friday' => 'Friday','Saturday' => 'Saturday','Sunday' => 'Sunday'))); ?>
@ChristopherLMiller
Copy link

Another option is to do it is array(1 => 'monday', 'tuesday', wednesday', thursday', 'friday', 'saturday', 'sunday') that should index starting from 1 versus 0

@taleeb35
Copy link
Author

1 for monday 2 for tuesday and so on

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment