Home  »  CodeSnippets   »   How to set the JSON Header in PHP

How to set the JSON Header in PHP

Posted: February 7, 2022 | by Site Host

header('Content-Type: application/json');
echo json_encode($data);

Found this article interesting? Follow Brightwhiz on Facebook, Twitter, and YouTube to read and watch more content we post.

Share it!

See also  CSS Remove Border Input Focus