• 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

Any AWS EB Laravel route getting 404 Not Found nginx/1.16.1

Clients authentication and user authentication with laravel

jQuery Ajax Post with data

Laravel query builder binding parameters more than once

Exact alternate to mcrypt_encrypt in PHP 7.2

PHP AWS Cognito 'Error executing "SignUp" : ResourceNotFoundException : User pool client XXXX does not exist

Querying only one row from a one to many relationship laravel

(Cache::lock()) -> get() -- Under what conditions does it return false?

Add 2 Webcam in one page with WebcamJS

Laravel MSSQL Server Connection not working

Limit login attempts in Laravel 5.7

array_key_exists(): The first argument should be either a string or an integer

WordPress Subquery returns more than 1 row on SELECT

run a query using EXECUTE BLOCK to prepair a column for an unique-Index

how to check version of codeigniter framework?

About Contact Privacy policy Terms and conditions