• 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 to reset Laravel AuthManager/guards in between API calls in tests?

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

How to send parameters in soap request in php in __soapcall() function

Laravel print last executed SQL query with Query log

send email using gmail-api and google-api-php-client

Detect if PHP session exists

SlimExceptionHttpNotFoundException

XML to CSV with PHP converter [problem with images grabing]

WooCommerce Subscriptions: Remove role on cancelled subscription

Can't exclude directories from .htaccess mobile redirect?

Lexik JWT authentication problem "Invalid credentials"

How can I remove the "Advanced" panel of all blocks in WordPress block editor?

Undefined variable in Laravel 8 project (php 7.4)

Laravel Mixing of GROUP columns (MIN(),MAX(),COUNT(),...) on a sub query with "ROW_NUMBER() OVER PARTITION"

Laravel - How to properly generate unique slugs from article titles?

About Contact Privacy policy Terms and conditions