• 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

Doctrine 2 mapping referencing unique key

Declaration of OMDb::query(string $statement) must be compatible with PDO::query

IlluminateDatabaseQueryException could not find driver [duplicate]

Error when uploading certain .png files "Interlace handling should be turned on when using png_read_image"

Laravel Route issues with Route order in web.php

Symfony - EasyAdmin - Add and remove functions are ignored from AssociationField

Use same method for inertia response and json response Laravel Jetstream

Attempted to call an undefined method named "get" of class "MailController"

Sagepay Error The Vendor failed to provide a RedirectionURL

Using array_intersect on a multi-dimensional array

Php - Sum up the numbers in an array one by one

How do I call a php file with axios?

Querying only one row from a one to many relationship laravel

Applying programmatically a coupon to an Order in WooCommerce3

Adding custom body class to the custom archive pages

About Contact Privacy policy Terms and conditions