• 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

PHP AWS Cognito 'Error executing "SignUp" : ResourceNotFoundException : User pool client XXXX does not exist

Stop caching for PHP 5.5.3 in MAMP

Trying to iterate over a mongodb cursor twice - failing

I want to display default profile image if user do not have profile image

PHPMetrics option --excluded-dirs="myfolder" : myfolder dir is not excluded within docker

How to create laravel storage symbolic link for production or sub domain system?

Limit of log line written to Apache Errorlog from mod php error_log

mysql_result is defined but mysql_free_result warns it expected a resource

How to fix 'Data has already been sent to output, unable to output PDF file' in MPDF

Where do I need to place a hook for phpunit?

How to get the ID of the link in another page in php

laravel 5.6 bulk inserting json data

Center point of multiple gps coordinates with php

yii2 and mssql insert varbinary into model

PHP array, move keys and values to new array, but mix it up

About Contact Privacy policy Terms and conditions