• 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 can I set a session variable in Drupal 8 and get it in a php script?

PHP: remove filename from path

XSS attack still works despite htmlspecialchars() doing its work

How to KeyBy where multiple items have the same key

How to get the total hour from starting time to end time in php

Insert multidimensional array to codeigniter cart

php code to send checkbox form results to email

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

Laravel Mix Uncaught ReferenceError: $ is not defined

storagelogs/laravel.log" could not be opened in append mode: failed to open stream: Permission denied

How do I do HTTP basic authentication using Guzzle?

WAMP/Wordpress - cURL error 28: Operation timed out after 10001 milliseconds with 0 bytes received

Remove country code from phone number?

calling server using nusoap with complextype

Detect emoticons in string

About Contact Privacy policy Terms and conditions