nerdexam
CiscoCisco

350-401 · Question #1080

350-401 Question #1080: Real Exam Question with Answer & Explanation

The correct arrangement uses '$encodedJSON' as the variable to store the result, and 'json_encode' as the PHP function to convert a PHP array into JSON format. The script follows the pattern: '$encodedJSON = json_encode($inputArray);', where json_encode() is the built-in PHP func

Submitted by katya_ua· Mar 6, 2026Server-Side Scripting and Data Interchange - understanding how to use PHP built-in functions to encode and decode data in JSON format for web application development and API communication.

Question

Drag and Drop Question Drag and drop the code snippets from the bottom onto the blanks in the PHP script to convert a PHP array into JSON format. Not all options are used. Answer:

Explanation

The correct arrangement uses '$encodedJSON' as the variable to store the result, and 'json_encode' as the PHP function to convert a PHP array into JSON format. The script follows the pattern: '$encodedJSON = json_encode($inputArray);', where json_encode() is the built-in PHP function specifically designed to serialize PHP values (arrays, objects) into a JSON-formatted string.

Topics

#PHP#JSON#Data Serialization#Web Development

Community Discussion

No community discussion yet for this question.

Full 350-401 PracticeBrowse All 350-401 Questions