• 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

CodeIgniter extend CI_URI undefined method

html-php form submission after validation through JavaScript [closed]

How to disable only_full_group_by option in Laravel

Xdebug in Laravel is not working with VSCode

how to pass row id in href of a tag in codeigniter controller?

NGINX: connect() to unix:/var/run/php7.2-fpm.sock failed (2: No such file or directory)

How to set a domain name with php artisan serve

Distribute array row data to make multiple new rows

PHP Discord OAUTH2 code sample not working

How do I call a php file with axios?

Cannot pass null argument when using type hinting

Add and update products to session cart in Laravel

Get sql.h error on MacOS 12 (Monterey) sqsrv and pdo_sqsrv drive installation

How to break out of a foreach once a condition is met?

WooCommerce: Add/display Product or Variation custom field everywhere

About Contact Privacy policy Terms and conditions