• 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

What is PHP's equivalent of JavaScript's "array.every()"?

PHP to search within txt file and echo the whole line

how to hide previous markers when new markers added in google map javascript api

getting error while enter Command => php artisan route:list

Hi, I am making a contact form thingy, and my php isn't working any reason why?

Use Python plotly chart in PHP

Alert message after submitting form in PHP

Parameter is not sent to Laravel route in Ajax

Change user role if checkout custom checkbox is checked in WooCommerce

How to modify CSS in a specific page of the WP admin dashboard (backend)

PHP: PDO + CSV export not downloading (headers issue?)

Laravel Nova, route not found

How to pass security cloudflare server with php curl

How to make a foreign key not using primary key

merge all files in directory to one text file

About Contact Privacy policy Terms and conditions