• 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

Symfony Mercure "Failed to send an update"

Check If array is null or not in php

backup files to google drive using PHP

Laravel websockets AWS EC2 - Connection failed

PHP returning an error message and false

Laravel insert dynamic input values with radio button

How can I get a div content in php

What is the function of the (new Date()).getTime() in PHP?

Add 2 Webcam in one page with WebcamJS

HTML and PHP in one file

Confirm Leave on External Links in Wordpress

Xdebug 3 not showing in phpinfo on m1 Monterey

WordPress Subquery returns more than 1 row on SELECT

How to increase the PHP upload limits [duplicate]

Clients authentication and user authentication with laravel

About Contact Privacy policy Terms and conditions