• 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

Laravel after login Two factor not working

Clear javascript source cache laravel 5.8

MySQL - Connection failed: No route to host

Laravel Unresolvable dependency resolving [Parameter #0 [ <required> $method ]] in class GuzzleHttpPsr7Request

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

Don't show recurring price for WooCommerce subscriptions worth 0$

Filter array by skipping every nth element from the end

Docker image build with PHP zip extension shows "bundled libzip is deprecated" warning

laravel automatically deletes server.php on php artisan serve

cakephp save drag and drop list order to database

Insert database rows from columns of data from associative array of indexed arrays

Invalid value in field "itemtype" in Google Search Console

hidden INPUT value not available in $_POST

Sum column values from multiple arrays

Manage independently the decimal number of the price of each product [duplicate]

About Contact Privacy policy Terms and conditions