• 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

Why the name of trucks are same in 2nd and 3rd record of company data retrieval?

How to create custom authentication in laravel 8?

Error converting docx to pdf using Unoconv

Symfony 4: "Autowire: you should configure its value explicitly."

Yii2 select2 database exception number of bound variables does not match number of tokens

PHP if in_array() how to get the key as well?

advanced custom fields wordpress custom class

How to fix this error : Ask your hosting provider to use PHP 7.2.5 or higher for both HTTP and CLI?

I cannot create a auto generated date time in mysql workbench

How to validate tin and cst using PHP?

CodeIgniter extend CI_URI undefined method

How to check user Permissions using Custom Middleware in Laravel

How to use $this->session->set_userdata in codeigniter

Yii2: How do I debug console commands?

Sentry on Symfony: how to exclude `NotFoundHttpException`

About Contact Privacy policy Terms and conditions