• 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

PHPUnit gives error: Target [IlluminateContractsViewFactory] is not instantiable

Getting values for an enum?

backup files to google drive using PHP

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

Detect emoticons in string

Fatal error: [] operator not supported for strings

Two buttons one form

Normalize DateInterval in PHP

Show date difference as "20" instead of "20 years ago"

Fatal error: Array callback has to contain indices 0 and 1

How to set time with DateTime modify?

PHP: Print caught exception like Xdebug

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource [duplicate]

Losing session data after POST from third party website

Class AppHttpControllersUserController Does Not Exist

About Contact Privacy policy Terms and conditions