If they all have the same style, you can use classes. For instance:
echo "<input type='text' class='emailinput' id='email[".$i."]' name='email[".$i."]' /> ";
And in CSS you can style these elements:
.emailinput
{
width: 20px;
background-color: red;
}
By the way, I added a slash to the end of the input element. This is for valid XHTML code. You must do this for all input elements ( />).
source
share