• 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

The "client_reference_id" argument is not passed

php - add comma thousands separator but remove trailing zeros

How to add a heading in between checkout fields of WooCommerce

Error loading MySQLdb Module 'Did you install mysqlclient or MySQL-python?'

Issue with laravel eloquent model property

Edit XML in HTML form and submit to self

How to assert parameter attribute sub-structures in PHPUnit mock call expectations

wp_remote_get() not passing authentication

Doctrine ORM: Excluding Records Based on Values of Nested Relationships

SQLSTATE[42S02]: Base table or view not found: 1146 Table 'posts.post' doesn't exist

Need to display only array value in JSON output

Hide email address with stars (*)

enroll_table three field fetch to payment form to create payment field in laravel 5.5

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

add " ? " in url via htaccess RewriteRule

About Contact Privacy policy Terms and conditions