Created
January 11, 2013 22:09
-
-
Save cam-gists/4514379 to your computer and use it in GitHub Desktop.
better indents??
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$array = array( | |
'within' => 0, | |
'near' => 0, | |
'exceed' => | |
); | |
foreach($data as $key => $value) | |
{ | |
$r = businessHours(strtotime($value->ordereddate))/3600; | |
$diff = $r - $value->standard_sla; | |
if( $diff <= 0 ){ | |
$data['within']++; | |
} | |
elseif($diff <= $value->standard_sla - 1){ | |
$data['near']++; | |
} | |
elseif($diff <= $value->standard_sla){ | |
$data['within']++; | |
} | |
elseif($diff > $value->standard_sla){ | |
$data['exceed']++; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment