In PHP, the option to prevent associative arrays from being converted into objects when encoding to JSON is ________.

  • json_encode_assoc
  • json_encode_object
  • json_encode_array
  • json_encode_options()
To prevent associative arrays from being converted into objects during JSON encoding in PHP, you can use the json_encode function with the JSON_FORCE_OBJECT option.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *