• 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

CSV to PHP class properties

add " ? " in url via htaccess RewriteRule

Laravel Nova, route not found

How to validate tin and cst using PHP?

Make survey at laravel 5.4 and MySQL

Check if my GET request has Header: Token

Laravel 5 controller sending JSON integer as string

CSS file not imported in laravel blade view

How to use PHPCBF to fix one issue at a time?

file_get_contents() without "Http" to access external URL [closed]

How to disable only_full_group_by option in Laravel

How to get AJAX to post on second page?

SQL to convert multiple rows into a single row of variable length

PHP Deprecated issue when running artisan command

How to edit Records using CodeIgniter

About Contact Privacy policy Terms and conditions