• 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

error:14094410:SSL routines:ssl3_read_bytes:sslv3 alert handshake failure

Laravel Database Strict Mode

Cut an arabic string

find in set in laravel ? example

Display the WooCommerce product price inside a custom function

Dropdown with current value from Mysql

Yoast SEO (WordPress Plugin) - Get plugin generated data manually

Unable to guess the mime type as no guessers are available Laravel 5.2

Laravel: HTML in notification

Only on Firefox "Loading failed for the <script> with source"

How to install ZeroMQ for PHP on an Alpine Linux container?

PHPUnit (Phar) Fatal Error Only When Test Fails

Send same name multiple checkbox values via ajax

How do I enable error reporting in Laravel?

How to make a foreign key not using primary key

About Contact Privacy policy Terms and conditions