• 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 do I get friend list from Friends table with counts of friends of my friends

Laravel update hasMany relationship using saveMany

Laravel Nova, route not found

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource [duplicate]

Pages are working fine on localhost but not running on the hosting server

Trying to iterate over a mongodb cursor twice - failing

How to break out of a foreach once a condition is met?

HTML + PHP + PHPMAILER

Not able to access model in the controller mautic

Insert And Retrieve Data in MySQL with $.post Noob Question

How to solve cURL error 60: SSL certificate in Laravel 5 while Facebook authentication

stay with the last 15 elements of an array [duplicate]

json_encode turns array into an object

Apply filter array/return terms

array_map triple dimensional array [duplicate]

About Contact Privacy policy Terms and conditions