• 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

Not able to access model in the controller mautic

Split comma separated value from table column into rows using mysql?

PHP-Sort array based on another array?

Transpose and flatten two-dimensional indexed array where rows may not be of equal length

Cross-Origin Resource Sharing (CORS) witth Laravel and Vuejs

WAMP Virtual Host not working

Why is this PHP array not the same?

How do I loop through an MS SQL database with VB.NET?

html-php form submission after validation through JavaScript [closed]

php - add comma thousands separator but remove trailing zeros

Check if string contains a value in array [duplicate]

How to test a php login connected to a mysql db through xampp?

Explode not working properly with dash

Access denied for user 'homestead'@'localhost' (using password: YES)

Fatal error: Uncaught mysqli_sql_exception: Unknown database 'test' in ... (How do I fix that? Using PHP)

About Contact Privacy policy Terms and conditions