function my_substr_count(string $text, string $char):int
{
if(strlen($char) > 1){
return -1;
}
$re = "/($char)/";
preg_match_all($re, $text, $matches, PREG_SET_ORDER, 0);
return count($matches);
}
for($i = 1; $i < count($yourData); $i++){
$active_sheet2->setCellValue('A' . $i,"yellowline1");
$active_sheet2->setCellValue('B' . $i,"yellowline2");
$active_sheet2->setCellValue('C' . $i,"yellowline4");
$active_sheet2->setCellValue('D' . $i,"yellowline6");
}