Actually the question is based on the increment. But if anyone knows a better way of inserting table data into the database I’d like to hear it.
I had saved a db table into html and am now seeking the precise coding to insert into my new db table.
I modified by leaving out one field but adding another.
First I did a for loop to get all the <th> tags which have the field names by storing them in an array. Then I used the count() of that array within another for loop which has all the <td>. The array of the <th> serves as a multiple like this:
$allths = array();
for($th=0; $tdh<count($allths); $td++){
}
for($td=0; $td<count($alltds); $td++){
if($td %==0){ //I'm not exactly sure how the exact code is since I'm away from my computer
//I think somewhere within the if statement I have to put count($allths)
}
}
I want to add the exception of one field or column, but insert the rest in their columns. Plus I have one column placed elsewhere in the db table (does it matter if it’s not specified in order?)
ok. I have the old db table in html format. I deleted the old db table though. I recreated with some new fields and gotten rid of one field which existed in the the old. I’m concerned over how to insert it in.
Is it possible (as I’m trying) to make a sub array by taking the array of fields from the <th> tags and store up the <td> arrays of data in each field?