skip to Main Content

Return a JSON response as CSV file from spring-boot controller

In my spring-boot project, I am fetching information from an external API in a JSON format. The response is represented as follows: { "id":237, "first_name":"LeBron", "last_name":"James", "position":"F", "height_feet": 6, "height_inches": 8, "weight_pounds": 250, "team":{ "id":14, "abbreviation":"LAL", "city":"Los Angeles", "conference":"West", "division":"Pacific",…

VIEW QUESTION

CSV from a form php

I'm a begginer in PHP and I want to get data from a form which contains a name,a comment and a name of a photo the user selects, and put it in a csv.But when i try to write the…

VIEW QUESTION

Array into a csv with PHP

I have the next foreach: foreach(json_decode($result[$k], "true") as $result) { fputcsv($fp, $result); } and if I put a var_dump of that result it will return a list of arrays like: ["Id"]=> string(7) "1" ["Name"]=> string(29) "Name" ["Description"]=> string(19) "Description" ["Address"]=>…

VIEW QUESTION
Back To Top
Search