Hello,
I'm having with one of my arrays having a zero value and I'm not sure why
This is the array
$this->color[] = "#ff0000";
$this->color[] = "#0000ff";
$this->color[] = "#00ff00";
$this->color[] = "#FF6600";
$this->color[] = "#CC00CC";
$this->color[] = "#EDDC34";
$this->color[] = "#FFCC00";
$this->color[] = "#CC66CC";
$this->color[] = "#CC9999";
$this->color[] = "#CDDF60";
$this->color[] = "#44e2f1";
$this->color[] = "#33FFCC";
for ($i=0; $i<=11; $i++){
$this->zoneColors = $this->color[$i];
//var_dump($this->zoneColors);
}
$this->zoneColors = "#ffffff";
Here is the row values from the query
$this->zone1_id = $row['zone1_id'];
$this->zone2_id = $row['zone2_id'];
$this->zone3_id = $row['zone3_id'];
$this->zone4_id = $row['zone4_id'];
$this->zone5_id = $row['zone5_id'];
$this->zone6_id = $row['zone6_id'];
$this->zone7_id = $row['zone7_id'];
$this->zone8_id = $row['zone8_id'];
$this->zone9_id = $row['zone9_id'];
$this->zone10_id = $row['zone10_id'];
$this->zone11_id = $row['zone11_id'];
Here is the view population
$reporthtml .= sprintf("<td><span style=\"width:100%%; white-space: nowrap; \">%s</span></td>
<td><span style=\"width:100%%; white-space: nowrap; \">%s</span></td>
<td><span style=\"width:100%%; white-space: nowrap; \">%s</span></td>
<td><span style=\"width:100%%; white-space: nowrap; \">%s</span></td>
<td><span style=\"width:100%%; white-space: nowrap; \">%s</span></td>
<td bgcolor=\"%s\" title=\"%s - %s\" >
</td><td bgcolor=\"%s\" title=\"%s - %s\"></td><td bgcolor=\"%s\" title=\"%s - %s\"></td><td bgcolor=\"%s\" title=\"%s - %s\">
</td><td bgcolor=\"%s\" title=\"%s - %s\"></td><td bgcolor=\"%s\" title=\"%s - %s\"></td><td bgcolor=\"%s\" title=\"%s - %s\"></td>
<td bgcolor=\"%s\" title=\"%s - %s\"></td><td bgcolor=\"%s\" title=\"%s - %s\"></td><td bgcolor=\"%s\" title=\"%s - %s\"></td>
<td bgcolor=\"%s\" title=\"%s - %s\"></td></tr>\n",
$entry->inspType,
$entry->assetName,
$entry->inspID,
$entry->operator,
$entry->date,
$this->zoneColors[$entry->zone1_id],
$entry->zonename1,
$entry->timestamp1,
$this->zoneColors[$entry->zone2_id],
$entry->zonename2,
$entry->timestamp2,
$this->zoneColors[$entry->zone3_id],
$entry->zonename3,
$entry->timestamp3,
$this->zoneColors[$entry->zone4_id],
$entry->zonename4,
$entry->timestamp4,
$this->zoneColors[$entry->zone5_id],
$entry->zonename5,
$entry->timestamp5,
$this->zoneColors[$entry->zone6_id],
$entry->zonename6,
$entry->timestamp6,
$this->zoneColors[$entry->zone7_id],
$entry->zonename7,
$entry->timestamp7,
$this->zoneColors[$entry->zone8_id],
$entry->zonename8,
$entry->timestamp8,
$this->zoneColors[$entry->zone9_id],
$entry->zonename9,
$entry->timestamp9,
$this->zoneColors[$entry->zone10_id],
$entry->zonename10,
$entry->timestamp10,
$this->zoneColors[$entry->zone11_id],
$entry->zonename11,
$entry->timestamp11);
Now if I do a var_dump of the values I get values until I get to the point where they are populated. At that point I get a null value.
Any one got any ideas