• 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

Do I need to install `fxp/composer-asset-plugin` if I'm not doing front-end development

zsh: command not found: php

Laravel Passport - Not able to get token string in response?

Adding custom body class to the custom archive pages

Split comma separated value from table column into rows using mysql?

PHPUnit (Phar) Fatal Error Only When Test Fails

*** ERROR *** The PHP configuration loaded file is: c:/wamp64/bin/php/php8.1.0/php.ini - should be: c:/wamp64/bin/apache/apache2.4.53.1/bin/php.ini

Target Individual Form Instance/Counter Inside A PHP While Loop

How to Generate PDF invoice to XML format using mPDF

how to redirect the user back to desired URL after login page in PHP?

Laravel 5.1 xmlHttpRequest AJAX POST TokenMismatchException

Match csv filenames to table names and import

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

Wordpress wpdb->delete issue

Live search query using JS and PHP for QA forum

About Contact Privacy policy Terms and conditions