• 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

PHP Get value from JSON [duplicate]

possible options to create pdf file using html elements to generate invoice in php and codeigniter

PHP: Telegram Bot: Insert line break to text message

definer/invoker of view lack rights to use them

MySQL/PHP - Web Based Game -User specific inventory table or 1 giant table? Another option?

CodeIgniter 3 is generating a session file on each request, why?

Laravel Collections. Is there some kind of assertStructure method?

Limit login attempts in Laravel 5.7

How to send upload image through email

Can I use a WooCommerce function without any WooCommerce page?

Symfony autowiring issues since docker update

Fatal error: Array callback has to contain indices 0 and 1

HTML and PHP in one file

PHP Imap , php 7.4.3 on mac osx catalina

Laravel 5 issue with wherePivot

About Contact Privacy policy Terms and conditions