Advertisement
Guest User

Untitled

a guest
Jul 23rd, 2019
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.18 KB | None | 0 0
  1. $arrayData = json_decode($jsonData, true);
  2. $csvFileName = 'reports.csv';
  3. $fp = fopen($csvFileName, 'w');
  4.  
  5. foreach($arrayData as $row){
  6. fputcsv($fp, $row);
  7. }
  8.  
  9. fclose($fp);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement