• 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

User pool client {id}does not exist

laravel 5.6 bulk inserting json data

How can I pass the list to the component variable in Laravel?

PHP password_verify

Symfony there are no commands defined in the "make" namespace

Group rows by column and sum another column within groups [duplicate]

Laravel Nova, route not found

Inserting Country Selection into MySQL PHP [duplicate]

Trying to iterate over a mongodb cursor twice - failing

How to load Codeigniter 4 lang file into an array variable

CONCAT columns with Laravel 5 eloquent

how to remove %20 in the url in php

Laravel Gates using model and returns "Using $this when not in object context" Line 28 of AzureUser model

PHP: How to quickly split a key=value file into associative array

Explain how this array transposing and flattening function works

About Contact Privacy policy Terms and conditions