Answers for "make json array of specfic object in php"

PHP
5

php return json

header('Content-type: application/json');
echo json_encode($array);
Posted by: Guest on March-20-2020
0

convert text file to json php

<?php
  header('Content-type: application/json');
  echo json_encode( explode("\r\n",file_get_contents('data.txt')) );
?>
Posted by: Guest on November-04-2020

Code answers related to "make json array of specfic object in php"

Browse Popular Code Answers by Language