I tried to assigned the php string into my csv cell value, but cell always return blank value. The value it self came from 2 requests, one from mysql and another from curl. from mysql request it's working fine but when I assigned the value from curl request, I face this problem.
here my code so far:
foreach ($arr->data as $datas) {
foreach ($datas->location as $locations) {
$item_id = json_encode($locations->item_id) . "\n";
$area_id = json_encode($locations->area_id) . "\n";
$staff_id= json_encode($locations->staff_id) . "\n";
while($row = $query->fetch_assoc()) {
###This row from mysql###
....
##started row from curl###
if($row['item_id'] == $item_id && $row['area_id'] == $area_id){
$activeSheet->setCellValue('O'.$i , $staff_id);
}
....
This part it's not working $activeSheet->setCellValue('O'.$i , $staff_id);
but if I echo or print it, the value appeared.
Anyone can help :(, almost a week try to solved this