Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
CS0110 3.1 - Variables in Action
// $unitsSold has the data from the database
$totalUnitsSoldInQ4 => array(
2014 => $unitsSold[2014][10] + $unitsSold[2014][11],
2015 => $unitsSold[2015][10] + $unitsSold[2015][11],
);
if ( $totalUnitsSoldInQ4[2015] < $totalUnitsSoldInQ4[2014] ) {
printReport();
}
if ( ( 98180 + 79436 ) < ( 128039 + 90512 ) ) {
printReport();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment