krishna vala

krishna vala

  • NA
  • 290
  • 69.4k

Updated version of php from 7.3 to 7.4.

Jul 29 2020 4:03 PM
I updated version of php from 7.3 to 7.4. In this i'm getting, error message  in first line of code like  Array and string offset access syntax with curly braces is deprecated. Here is my code
 
$excel=(string) Excel::create('Fees_' . date('dmy'), function($excel) use ($fees_array,$count){
              $excel->setTitle('Fees_' . date('dmy'));
              $excel->sheet('Fees_' . date('dmy'), function($sheet) use ($fees_array,$count){
                            $sheet->fromArray($fees_array, null, 'A1', false, false);
                            $sheet->cell('A1:Z1', function ($cells) {
                                   $cells->setFontWeight('bold');
                           });
                         $sheet->setWidth('A', 5);
                         $sheet->cell('A1:A'.$count, function($cells) {
                         $cells->setAlignment('center');
                          });
              });
});
 
 
 
 
 

Answers (3)