This is my first time coding in PHP. I have this json file (screenshot). json file
It contains a name and sources array. I need to break up this "sources" array by the fields that are in the array (name, url, description, groupfields, and searchfields). I have used the json_decode function but I am stuck on how to break up things in this file. Here is my code so far. Any help/hints/tips would be appreciated. Mainly, I am confused about accessing the various elements and subelements in the sources array from the file. More background info: There is an html form and I am trying to add all the name elements from the sources array as options in the select element of the form.
$json_data = file_get_contents(SOURCE_URL);
$result = json_decode($json_data, true);
?>
<form action="P4.php" method="get">
Source Data
<select name ="sourcedata"></select> <br> <br>
<?php
$sources = $result['sources'];
#var_dump($sources);
#doing this var_dump successfully dumps the sources array
?>