• 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

How to change product Image when variables are selected in Shop and Archive Pages?

target [LaravelFortifyContractsRegisterViewResponse] is not instantiable

Laravel 5 controller sending JSON integer as string

How to identify whether webp image is static or animated?

I want to display default profile image if user do not have profile image

Not able to access model in the controller mautic

Warning: sqlite_query() expects parameter 1 to be resource, string given

Refresh specific HTML content that retrieves data from MySQL

get folder directory from input type file - PHP

get data-value with variable value

Laravel eloquent update record without loading from database

Wordpress add responsive srcset header image to theme

Nginx disallowing execution of PHP in uploads directory with Magento

(PHPUnit) PHP Fatal error: Uncaught Error: Call to undefined function each()

GRPC installed successfully on ubuntu but php is looking for it in another folder

About Contact Privacy policy Terms and conditions