title: Looping through $_POST variables
body: <p>Sorry i could not find a proper title to this question.
  I have generated the following using a for loop and I have concatenated the names of the submits buttons using the pattern below:
  submit_edit_category_1
  submit_edit_category_2
  submit_edit_category_3</p>
  
  <pre><code>echo "&lt;input type='submit' value = 'Edit' name='submit_edit_category_" . 
  $obj_categories_admin-&gt;categories[$i]['category_id'] . "'/&gt;";
  </code></pre>
  
  <p>I want to loop through these values so that I can the button action whichis edit_category and the category id which is 1,2 or 3. I want to so something like:</p>
  
  <pre><code>if(isset($_POST) == 'edit_category'))
  {
      //code here
  }
  </code></pre>
  
  <p>Someone suggested me to do it this way:</p>
  
  <pre><code>name="submit[which_action][which_category]"  
  a1 = $_POST['submit']; 
  $which_action = reset(array_keys($a1)); 
  $which_category = reset(array_keys($a1[$which_action])); 
  </code></pre>
  
  <p>This does not seem to work..Can anyone give me a different way to do it?
  Thanks!</p>