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.
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.
My networking skills are incredibly enhanced with the research required to answer this question!
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)
php in the encore!?
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); ?>
given answer is correct
Could someone confirm if this is correct?
Yes, answer is correct