title: php move data from one form to another but with multiple input ids
body: <p>I have a form where I set <code>textarea</code> field id by <code>for loop</code> using php</p>
  
  <pre><code>&lt;?php
  foreach ($restaurant as $rest_data) {
      ?&gt;
      &lt;textarea class="form-control" name="&lt;?= 'comment_' . $rest_data-&gt;id ?&gt;" id="&lt;?= 'comment_' . $rest_data-&gt;id ?&gt;" rows="3" placeholder="Leave a note for Restaurant (optional)" &gt;&lt;/textarea&gt;
      &lt;?php
  }
  ?&gt;
  </code></pre>
  
  <p>but I need this field value in another form's hidden field with their respective ids using jQuery or any other method like php session or anything </p>