πŸ“Š PHP
Q. Which PHP function outputs JSON with correct headers?
  • (A) echo json_encode()
  • (B) print json_encode()
  • (C) header('Content-Type: application/json')
  • (D) Both 1 and 3
πŸ’¬ Discuss
βœ… Correct Answer: (D) Both 1 and 3

Explanation: Header + json_encode ensures proper JSON response.

Explanation by: Kanak Sharma
Header + json_encode ensures proper JSON response.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
1
Total Visits
πŸ“½οΈ
6 h ago
Published
πŸŽ–οΈ
Kanak Sharma
Publisher
πŸ“ˆ
90%
Success Rate