• 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 convert time from one timezone to another in PHP

Using if(isset($_POST['submit'])) to not display echo when script is open is not working

SQL to convert multiple rows into a single row of variable length

Laravel PackageManifest.php: Undefined index: name

Composer Script echo

Laravel 5: Is there a non-case sensitive way to sort a collection by an attribute?

How to get the survey List from surveygizmo API in the Postman?(Trial Version)

wordpress function breaks wp-admin

How to add a custom field to all Woocommerce attribute terms using add_action

How to loop a tree array with unknown depth and get array blocks?

PHP array sort and remove duplicates by two field values

merge all files in directory to one text file

Yii2 redirecting to previous page after login

Unit (real unit test) of test laravel relationship

Filter array by skipping every nth element from the end

About Contact Privacy policy Terms and conditions