$inputArray = array()
→Defines a PHP array $inputArray, using the array() function to initialize it.
json_encode($inputArray, JSON_PRETTY_PRINT)
→The json_encode() function to convert the PHP array $inputArray to JSON format.
print($encodedJSON)
→This line outputs the JSON string encoded by json_encode()
Answer is correct.
// first configure array
$InputArray = array(......);
// json_encode function... the format is json_encode(name of the array)
$encodedJSON = json_encode($InputArray, JSON_PRETTY_PRINT);
//Finally print
Print ($encodedJSON)
This section is not available anymore. Please use the main Exam Page.350-401 Exam Questions
Log in to ExamTopics
Sign in:
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
Alondrix
Highly Voted 1 year, 7 months agomiknotna
Most Recent 4 months, 1 week agoislam215
8 months agochiacche
9 months, 1 week ago[Removed]
1 year agoIgorLVG
1 year, 3 months agoshefo1
1 year, 6 months agostudying_1
1 year, 7 months agommt1mmt1
1 year, 7 months agostudying_1
1 year, 7 months ago