In php, I'm trying to get the numbers (0, 13, 20, 45, 53, 56) from this json file:
{
"0": {
"classcat": "a",
},
"13": {
"classcat": "b",
},
"20": {
"classcat": "c",
},
"45": {
"classcat": "d",
},
"53": {
"classcat": "e",
},
}
Im populating this file to a selectfield with a foreach loop. My desired output would be:
<select>
<option value="(classcatvalue)">(classcatvalue + number)</option>
<option value="a">a 0</option>
<option value="b">b 13</option>
<option value="c">c 20</option>
<option value="d">d 45</option>
<option value="e">e 53</option>
</select>
Looks simple, but i cannot figure it out. Any ideas?