• 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

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

Toggle between a textbox and a select using PHP

How to add class name to an existing tag in php

Post Form Data To phpmyadmin Database

php retrieve specific data onclick from database in a list format

I want to use codeigniter foreign character library in my custom PHP project how i can use it?

OctoberCMS / Anonymous Global Scope

Why rand() every time I refresh the page?

Convert regular text to array using notepad++

Split a string array into pieces

Magento Installation SQLSTATE[HY000] [2002] No such file or directory error

how to identify the web server name of remote host

PHP Fatal error: Class not found - PHPUnit

php mysql + create a friend request system

Calculating Median of an array in PHP

About Contact Privacy policy Terms and conditions