FAQ
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>
----
Server IP: 69.147.83.199
Probable Submitter: 217.21.147.157
----
Manual Page -- http://php.net/manual/en/function.printer-list.php
Edit -- https://master.php.net/note/edit/112182
Del: integrated -- https://master.php.net/note/delete/112182/integrated
Del: useless -- https://master.php.net/note/delete/112182/useless
Del: bad code -- https://master.php.net/note/delete/112182/bad+code
Del: spam -- https://master.php.net/note/delete/112182/spam
Del: non-english -- https://master.php.net/note/delete/112182/non-english
Del: in docs -- https://master.php.net/note/delete/112182/in+docs
Del: other reasons-- https://master.php.net/note/delete/112182
Reject -- https://master.php.net/note/reject/112182
Search -- https://master.php.net/manage/user-notes.php

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupphp-notes @
categoriesphp
postedMay 14, '13 at 2:07p
activeMay 14, '13 at 2:07p
posts1
users1
websitephp.net

1 user in discussion

Fziu02: 1 post

People

Translate

site design / logo © 2019 Grokbase