• Categories
    • PHP
    • phpMyAdmin
    • PHPMailer
    • FFMpeg
    • PHPEXcel
    • PHPDoc
    • PHPUnit
    • CakePHP
    • CakePHP 2.0
    • Cake PHP 2.1
    • CakePHP Model
    • Facebook PHP SDK
    • composer-php
    • PHP 7
    • PHP GD
    All Categories
  • About

Loading data from MySQL and populating dropdown select with jQuery Mobile, PHP

phpmysqljquery-mobile


PHP Snippet 1:

header('Content-Type: application/json');
echo json_encode($data);

PHP Snippet 2:

$.each(data,function(index,item) 
{
    $('<option>').val(item.id).html(item.job_name).appendTo("#job_id");
});

Related Snippets

Edit product hook WooCommerce

How to create a individual template for page or post in custom plugin?

"Mixed content blocked" when running an HTTP AJAX operation in an HTTPS page

PHP, how to convert Int value to Week days

Using if(isset($_POST['submit'])) to not display echo when script is open is not working

How to write PHP in XSLT

How can I create a Download Page with post php method?

How to Generate PDF invoice to XML format using mPDF

Laravel Mixing of GROUP columns (MIN(),MAX(),COUNT(),...) on a sub query with "ROW_NUMBER() OVER PARTITION"

Install mysql client in docker image

Adding one microsecond to Datetime object in PHP

Combining a describing and one array with data

Symfony Error: "An exception has been thrown during the rendering of a template"

Can I write PHP code across multiple lines per statement?

Cache clear probem in Larave

About Contact Privacy policy Terms and conditions