• 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 validate Envato Purchase Code in PHP

WooCommerce Additional Information - if empty, hide

Laravel MSSQL Server Connection not working

Unable to get password for the instance created from AMI

How to trim a video by 4 fragments to 4 seconds using the PHP-FFMpeg?

laravel automatically deletes server.php on php artisan serve

How to get array values using foreach in laravel

Laravel/ PHP: Order By Alphabetical with numbers in order [duplicate]

XDebug not working in VScode for php debugging

Laravel UUID generation

how to make my own auto increment in php?

run a query using EXECUTE BLOCK to prepair a column for an unique-Index

How can I make good efficent AJAX live forms with just jQuery and

how to validate form data in codeigniter 4

(PHPUnit) PHP Fatal error: Uncaught Error: Call to undefined function each()

About Contact Privacy policy Terms and conditions