• 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

I need to link Google Sheet with my Laravel

Remove product downloads section in woocommerce email notifications

unable to load your default controller on Codeigniter

PHPExcel file download using AJAX call

Convert string to lowercase AND then convert it to its original form in PHP, is it possible?

Having issue with matching rows in the database using PDO

Handle error for duplicate entries - PHP/MySQL

PHP Slim Framework request using withAttribute error

Get WooCommerce products from specific category

Laravel-fopen: failed to open stream: Permission denied

Autoloading classes in PHPUnit using Composer and autoload.php

curl returning 301 error after migrating to https

Explain how this array transposing and flattening function works

browsersync doesn't work with XAMPP

How Can I Do LIMIT 1, 2 In WP_Query

About Contact Privacy policy Terms and conditions