• 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

Insert a DIV after the 6th product only once in WooCommerce category archives

Detect a fetch request in PHP

Send POST data via raw JSON with Postman

Fatal error: [] operator not supported for strings

Magento Installation SQLSTATE[HY000] [2002] No such file or directory error

How to Generate PDF invoice to XML format using mPDF

WooCommerce - unset "<product> removed notice…" on cart page

Only on Firefox "Loading failed for the <script> with source"

How can I convert from a{a{} b{}} to a[a[],b[]] using php preg_match?

Get all WooCommerce products within own plugin

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

How To Access A Column In M-M Relationship Table In Laravel

Webscraping Symfony/Panther: Can't get HTML

Error while importing CSV file in database

Login if user is active using Laravel Breeze

About Contact Privacy policy Terms and conditions