I apologize if the title of my question makes you wonder if I've got monkeys flying out of my nose, but see if this doesn't better explain what I'm trying to get my head around...
Here's a sample of my data:
id title start_cell row_number
1 a 25 1
2 b 43 1
3 c 74 1
4 d 13 2
The code that I'm using is building a table on my page that consists of 84 cells. So, here comes my data as a digital entity called $results.
foreach ($results as $row)
//now I'm going through 83 cells, checking to see if there's any data that matches the row I'm on and the cell that I'm looking at
for ($y=0; $y<=83; $y++)
if($row['DataDisplay_Row']==1 AND $the_cell==$y)
//write something in the cell
What I've got results in table consisting of four rows rather than two. Do you smell what I'm cooking? How can I arrange my code so I only get two rows?