• 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

Symfony Error: "An exception has been thrown during the rendering of a template"

Facebook API, get page post link (PHP)

Mysqli Output to a table

generating a random code in php?

Laravel 5 issue with wherePivot

Update Total in checkout of Woocommerce with Ajax Request

PHP Slim Framework request using withAttribute error

Multiply each value in array using array_map function

How do I pass the dynamic output of a php variable or php function to a CSS variable?

Last order would be re-order in wooCommerce. How is it possible?

Component install error: JInstaller: :Install: File does not exist

I can't delete my image when it is liked because of the foreign key in mysql

Woocommerce Edit Message "An account is already registered with your email address. Please log in."

How to show a popup modal in codeIgniter?

How to change the app environment at run time?

About Contact Privacy policy Terms and conditions