• 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

Laravel Multi-language routes without prefix

Laravel Delete and Update

Doctrine 2 mapping referencing unique key

possible options to create pdf file using html elements to generate invoice in php and codeigniter

How to delete old images from public folder on update using Laravel

SQL AVG() to 2 decimals

Reducing authentication calls on external API (Laravel 5.6)

Display a product custom field only in WooCommerce Admin single orders

Modify microseconds of a PHP DateTime object

unable to load your default controller on Codeigniter

Unsure why I am getting: Number of variables doesn't match number of parameters in prepared statement

WooCommerce: Add/display Product or Variation custom field everywhere

Reading input in php from terminal

Display Link Title Instead of URL in XSL

"properties should not be accessed directly" issue during WooCommerce 3.0 checkout

About Contact Privacy policy Terms and conditions