how to get radio value from radio button by form api drupal How to get radio value from radio button by using the following code

$form['pd']= array(
  '#type' =&gt; 'radio',
  '#title' =&gt; t('Programme Day'),
  '#options' =&gt; array(0 =&gt; 'One Day Programme', 1 =&gt; 'Two or More Day Programmes'),
  '#required'=&gt;TRUE
);

$form['one_day'] = array(
  '#title' =&gt; t('Date'),
  '#type' =&gt; 'date',
  '#description' =&gt; t('Please select the date of Programme'),
  '#required' =&gt; TRUE,
  '#date_format' =&gt; "d-m-Y h:i A",
  '#date_year_range' =&gt; -15:+1',
  '#states' =&gt; array('visible' =&gt; array(':input[name="pd"]' =&gt; array('value' =&gt; 0)))
);


$form['from_day'] = array(
  '#title' =&gt; t('From Date'),
  '#type' =&gt; 'date',
  '#description' =&gt; t('Please select the from date of Programme'),
  '#required' =&gt; TRUE,
  '#date_format' =&gt; "d-m-Y h:i A",
  '#date_year_range' =&gt; '-15:+1',
  '#states'=&gt;array('visible'=&gt;array(':input[name="pd"]'=&gt;array('value'=&gt;1)))
);

$form['two_day'] = array(
  '#title' =&gt; t('To Date'),
  '#type' =&gt; 'date',
  '#description' =&gt; t('Please select the To date of Programme'),
  '#required' =&gt; TRUE,
  '#date_format' =&gt; "d-m-Y h:i A",
  '#date_year_range' =&gt; '-15:+1',
  '#states'=&gt;array('visible'=&gt;array(':input[name="pd"]'=&gt;array('value'=&gt;1)))
);


I tried the following code but the value shows as array not value.

$prog_day = $form_state['values']['pd'];

$one_date = $form_state['values']['one_day'];
$from_date = $form_state['values']['from_day'];
$two_date = $form_state['values']['two_day'];
if you are looking for the submitted values you need to look in the $form_state and not the $form array.

use $form_state['values']['your field name'], 
depending on element type you might have ['und'][0] or just [0] on the end.