• 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

Store / Website Column in Magento 2 Admin Grid - Custom Module

unable to load your default controller on Codeigniter

backup files to google drive using PHP

CONCAT columns with Laravel 5 eloquent

SQL AVG() to 2 decimals

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

PHP Include for HTML?

Elasticsearch - Want to sort by field in all indices where that particular field available or not if not then avoid it

Batch request Google Calendar php API

PHPExcel How to set conditional formatting to change cell background color based on cells values

401 Unauthorized only occurring on some pages in Laravel 8

How do I upload a laravel project on cPanel shared hosting?

Return multiple values from a function using mysqli_fetch_assoc [closed]

php echo remove slashes from url [duplicate]

PHP | "The requested PHP extension bcmath is missing from your system."

About Contact Privacy policy Terms and conditions