Fill the select options with formatted days

Public

Get raw version
php
  1. $day_in_sec = 60 * 60 * 24;
  2. $form['period'] = array(
  3. '#type' => 'select',
  4. '#title' => t('Period'),
  5. '#options' => drupal_map_assoc(range($day_in_sec, 14 * $day_in_sec, $day_in_sec), 'format_interval'),
  6. );