Skythrust
Member
- Jul 9, 2019
- 133
- 7
Hi there,
I would like to have some details from a JSON into a PHP page.
It needs to look like this below, but not hardcoded. And when there is another record it need to come here as well. Other important thing is that the status Online makes the switch between TextOn or TextOff
Any idea how I can realise this?
I would like to have some details from a JSON into a PHP page.
JSON:
[{"Name":"Diesel,Jhon",,"Time":"2021-02-11T09:45:17.517","Online":true},{"Name":"Doe,Jane",,"Time":"2021-02-11T09:47:17.517","Online":false}]
It needs to look like this below, but not hardcoded. And when there is another record it need to come here as well. Other important thing is that the status Online makes the switch between TextOn or TextOff
HTML:
<div class="TextOn">John von Diesel
<label class="switch">
<input type="checkbox" checked>
<span class="slider round"></span>
</label>
</div>
<div class="TextOff">Jane Doe
<label class="switch">
<input type="checkbox" unchecked>
<span class="slider round"></span>
</label>
</div>
Any idea how I can realise this?