I have sheet-based stretch values
if ($slaHours >= 0 & $slaHours <= 72)
What I want to do is set the color of these values ββif the value is less than 12. I still want to display values ββgreater than 12 and less than 72, so the code I tried is
$styleArray = array(
'font' => array(
'bold' => true,
'color' => array('rgb' => 'FF0000'),
));
if ($slaHours >= 0 & $slaHours <= 72)
$slaHours = $objWorksheet->getCellByColumnAndRow(3, $row)->getValue();
if($slaHours <=12) {
$slaHours = $objWorksheet->getCellByColumnAndRow(3, $row)->getValue()->applyFromArray($styleArray);
However, I get a fatal error
"Calling the applyFromArray () member function for a non-object"
Pretty new PHP material for this, so any help in getting this work is really appreciated.
thank
source
share