Multiple Submit in a Drupal Form
It should be because the way you're generating the form is wrong, form element should be as below:

&lt;?php
function mymodule_form($form, &amp;$form_state, $i) {
  $form['value_' . $i-&gt;fid] = array(
    '#type' =&gt; 'value',
    '#value' =&gt; $i-&gt;fid,
  );
  $form['view_' . $i-&gt;fid] = array (
    '#type' =&gt; 'submit',
    '#value' =&gt; t('view'),
    '#name' =&gt; 'view_' . $i-&gt;fid,
  );
  $form['delete_' . $i-&gt;fid] = array (
    '#type' =&gt; 'submit',
    '#value' =&gt; t('delete'),
    '#name' =&gt; 'delete_' . $i-&gt;fid,
  );

  return $form;
}
?&gt;


Each element name in $form array should be unique. Check Drupal Form API reference guide for more details. The value, view and delete doesn't contain any form element data like #type, etc. Please check the value of $form_state['values']['op'] in your form submit handler to understand which one is called.