To simplify this posed question, assume that each cell has a Row Name and a Column name that properly maps you to the appropriate cell. I'm looping through DB records and creating a location for certain fields in a 2D array that I'll be returning to the caller. My question is how can I tell if a cell already exists at array[rownName][colName]?
Here's a high level view of what I'm attempting to do:
//While there are more records:
while ($row = mysql_fetch_assoc($result)) {
//If this key doeesn't already exist in the return array,
//add this key/value pair.
//Proper logic for determining whether or not a cell has already been
//created for this record would go here...
$ret[$row['output_row_id']][$row['output_name']] = $row['output_value'];
}
Thanks in advance for all of your help SO!