A

Admin • 828.03K Points
Coach

Q. What does the function json_encode() do?

  • (A) Converts a JSON string to an array
  • (B) Converts an array or object to JSON string
  • (C) Decodes JSON string to object
  • (D) Encodes a string to base64
  • Correct Answer - Option(B)
  • Views: 10
  • Filed under category PHP
  • Hashtags:

Explanation by: Admin
json_encode() converts PHP arrays or objects into JSON format.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.