title: PHP : "Range". Customize the parameter value to be "Default" or" Empty"
body: <p>I am working on PHP using "range" for the dropdown. How should I customize the parameter in array value that should be "Default value" or" Empty" by default. Option value should not be"0". Can someone point me in the right direction. thanks in advance...</p>
  
  <pre><code>&lt;?php
  function r_range( $start, $end, $steps = 1, $placeholder ) {
  
      $range_options = array($placeholder);
      $placeholder = array();
      $range_values = range( $start, $end, $steps);
  
      foreach ( $range_values as $key =&gt; $value ) {
          $range_options[$value] = $value;
          $placeholder = array_merge( $placeholder, range( $start, $end, $steps ));
      }
      return $range_options;
  }
  
  $r_options[] = array(
                  'name'    =&gt; 'Autoplay Interval',
                  'desc'    =&gt; 'Autoplay interval timeout for the slides. where 1000 = 1 sec',
                  'id'      =&gt; 'owlslide_timeout',
                  'std'     =&gt; '5000',
                  'type'    =&gt; 'select',
                  'options' =&gt; r_range(1000, 10000, 1000, 'Select Duration' ),
  );
  
  foreach ( $r_options as $key =&gt; $value ) {
      if ( $value['type'] == 'heading' || $value['type'] == 'subnav' ) {
          $s_headings[] = $value;
      }
  }
  
  $value_options = isset( $value['options'] ) ? $value['options'] : '';
  
  echo '&lt;select&gt;';
  foreach ( $value_options as $key =&gt; $option ) {
      echo '&lt;option value="' . $key . '" /&gt;' . $option . '&lt;/option&gt;'. "\r\n";
  }
  echo '&lt;/select&gt;';
  </code></pre>