exam questions

Exam 350-401 All Questions

View all questions & answers for the 350-401 exam

Exam 350-401 topic 1 question 848 discussion

Actual exam question from Cisco's 350-401
Question #: 848
Topic #: 1
[All 350-401 Questions]

DRAG DROP
-

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.

Show Suggested Answer Hide Answer
Suggested Answer:

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
Alondrix
Highly Voted 1 year, 3 months ago
My networking skills are incredibly enhanced with the research required to answer this question!
upvoted 28 times
...
miknotna
Most Recent 2 days, 11 hours ago
I'd better skip this question. I hope it doesn't get to me.
upvoted 1 times
...
islam215
3 months, 3 weeks ago
what are we !! Devops engineers !!!
upvoted 2 times
...
chiacche
5 months ago
$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()
upvoted 2 times
...
[Removed]
8 months, 2 weeks ago
given answer is correct
upvoted 2 times
...
IgorLVG
11 months, 2 weeks ago
php in the encore!?
upvoted 4 times
...
shefo1
1 year, 2 months ago
correct answer from google bard <?php $inputArray = array( "Listed devices" => array( "Site" => "Backbone", "data" => array( "IP" => "192.168.1.2", "Hostname" => "SW Core01", "Status" => "Active" ) ) ); $encodedJSON = json_encode($inputArray, JSON_PRETTY_PRINT); print($encodedJSON); ?>
upvoted 2 times
...
studying_1
1 year, 3 months ago
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)
upvoted 4 times
...
mmt1mmt1
1 year, 3 months ago
Could someone confirm if this is correct?
upvoted 1 times
studying_1
1 year, 3 months ago
Yes, answer is correct
upvoted 3 times
...
...
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.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago