3v4l.org

run code in 300+ PHP versions simultaneously
<?php //$printers=file_get_contents ("config/printers.json"); $printers = '[ { "Name": "CR-10", "GantryStyle": 1, "comment": "", "image": "cr-10.jpg", "option1": "" }, { "Name": "CR-10 V2", "GantryStyle": 1, "comment": "", "image": "cr-10.jpg", "option1": "" }, { "Name": "CR-10 Mini", "GantryStyle": 1, "comment": "", "image": "cr-10.jpg", "option1": "" }, { "Name": "CR-10S", "GantryStyle": 1, "comment": "", "image": "cr-10.jpg", "option1": "" }, { "Name": "CR-10S4", "GantryStyle": 1, "comment": "", "image": "cr-10.jpg", "option1": "" }, { "Name": "CR-10S5", "GantryStyle": 1, "comment": "", "image": "cr-10.jpg", "option1": "" }, { "Name": "CR-10S Pro", "GantryStyle": 1, "comment": "", "image": "cr-10.jpg", "option1": "" }, { "Name": "CR-10S Pro V2", "GantryStyle": 1, "comment": "", "image": "cr-10.jpg", "option1": "" }, { "Name": "CR-10 Max", "GantryStyle": 1, "comment": "", "image": "cr-10.jpg", "option1": "" }, { "Name": "CR-20", "GantryStyle": 1, "comment": "", "image": "cr-10.jpg", "option1": "" }, { "Name": "Ender 3", "GantryStyle": 1, "comment": "", "image": "cr-10.jpg", "option1": "" }, { "Name": "Ender 3X", "GantryStyle": 1, "comment": "", "image": "cr-10.jpg", "option1": "" }, { "Name": "Ender 3 V2", "GantryStyle": 1, "comment": "", "image": "cr-10.jpg", "option1": "" }, { "Name": "Ender 3 Pro", "GantryStyle": 1, "comment": "", "image": "cr-10.jpg", "option1": "" }, { "Name": "Ender 3 Pro/BLV Mod", "GantryStyle": 1, "comment": "", "image": "cr-10.jpg", "option1": "" }, { "Name": "Ender 5", "GantryStyle": 1, "comment": "", "image": "cr-10.jpg", "option1": "" }, { "Name": "Ender 5 Pro", "GantryStyle": 1, "comment": "", "image": "cr-10.jpg", "option1": "" }, { "Name": "Ender 5 Plus", "GantryStyle": 1, "comment": "", "image": "cr-10.jpg", "option1": "" }, { "Name": "Voxelab Aquila", "GantryStyle": 1, "comment": "", "image": "cr-10.jpg", "option1": "" }, { "Name": "Anet ET4/ET5", "GantryStyle": 1, "comment": "", "image": "cr-10.jpg", "option1": "" } ]'; $test= json_decode($printers,true); foreach($test as $t) { echo '<option value="'. $t['Name']. '">'. $t['Name'].'</option>'; }

preferences:
30.8 ms | 404 KiB | 5 Q