Wow. I haven't coded in years and I am a little bit rusty.
What is the best loop to use when I want to grab only certain rows(records). In the below example I am grabbing from a csc file that I am uploading and for now just displaying on the screen until I get it right and then it will dump into a database.
I want to start at record #48 and then grab every 3rd record from that point. 48,51,54,57, and so on.
This isn't working:
for ($i = 0; $i < 600; $i++) { // loop that goes through all the columns of 1 record. WORKING
for ($c = 48; $c < 1000; $c+3) { // HERE IT IS, NOT WORKING
echo "$data[$i] || ";
}
}
Also, if I don't know the condition ($i<600, $c<1000) ending value, what would be the best to use. Right now I am just using a real high number that I know isn't going to be met.
Thanks!!!!!!!!!