I have two arrays that I use to display monthly forecasts and actuals. The arrays are made up of elements of a mysql row.
I use foreach to iterate through them and show them one above the other.
print"<tr>";
foreach ($foresales as $fore) {
print"<td class='charts'>$fore</td>";
}
print"</tr><tr>";
foreach ($sales as $value) {
print"<td class='charts'>$value</td>";
}
print"</tr>";
Now I want to show the difference between each of the array elements to display the difference in forecast vs actual.
Forecast 123 124 145
Actual 111 124 145
difference here
Any thoughts?