note 112182 deleted from function.printer-list by sobak

From: Date: Thu, 24 Nov 2016 20:32:10 +0000
Subject: note 112182 deleted from function.printer-list by sobak
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-207583@lists.php.net to get a copy of this message
Note Submitter: fziu02 at gmail dot com ---- You can use AJAX, and everything works fine... PHP // lsprt.php <?php $getprt=printer_list( PRINTER_ENUM_LOCAL ); echo json_encode($getprt); ?> HTML <script> $.post('lsprt.php', function(data) { value = JSON.parse(data); for (val in value) { $('#asd').append('<option value="'+ value[val]['NAME'] +'">'+ value[val]['NAME'] +'</option>'); } }); </script> <select id="asd"></select>

« previous php.notes (#207583) next »