• 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 test laravel controller method?

php retrieve specific data onclick from database in a list format

What will the best solution for this multiple optional filter?

PHP error: "The zip extension and unzip command are both missing, skipping."

SQLSTATE[42S02]: Base table or view not found: 1146 Table 'posts.post' doesn't exist

CONCAT columns with Laravel 5 eloquent

PDOException: PDO::__construct(): php_network_getaddresses: getaddrinfo failed: no such host known

How to find the date a user created their Google account

"There is no active transaction" when refreshing database in Laravel 8.0 test

Image upload not working through ajax Laravel

send email using gmail-api and google-api-php-client

Hide specific products from unlogged users based in product category in WooCommerce

Codeigniter, Severity: error --> Exception: Too few arguments to function, admin dashboard shows HTTP error 500

Zig-zag scan an N x N array

How to put php code inside opening and closing shortcodes

About Contact Privacy policy Terms and conditions