Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7523687
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T02:52:31+00:00 2026-05-30T02:52:31+00:00

I got a html form which i loop like this: for($i=0;$i<10;$i++){ echo ‘<input type=text

  • 0

I got a html form which i loop like this:

for($i=0;$i<10;$i++){
  echo '<input type="text" name="field'.$i.'">';
}

then i make and hidden input with a count var which says that there are 10 such input fields. but now i hav $field0 to $field9 and i do not know how i can get the input in a for loop again.

thanks for your help!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T02:52:32+00:00Added an answer on May 30, 2026 at 2:52 am

    Use names like this in your input fields: ...'field['.$i.']'...

    This way in your $_POST these will show up in an array for you, and you can loop over them like:

    foreach ($_POST['field'] as $key => $value)
    {
    
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've got an input field on my plain html form that I would like
I've got this HTML form where I have multiple input elements: text, radio, and
I've got a HTML form with a lot of input fields, which I use
I have got below ASP html <div id=divCheckAll> <div class=selectall> <input type=checkbox id=chkOperationalUpdate name=chkOperationalUpdate
We have got an extjs 3.1.1 form with file upload field ( http://www.extjs.com/deploy/dev/examples/form/file-upload.html from
I've got HTML code that roughly looks like this: <li id=someid-11> <img src=... alt=alt
It's a really simple problem. I've got HTML code like this : <div> <img
I've got an HTML select element which I'm updating dynamically with code something like
I've got a html / php form which will add values to a a
I have got a html web page which gets a user input in the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.