• 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

Laravel eloquent update record without loading from database

Why "Class 'GuzzleHttpClient' not found" even after Installing it in Laravel?

Laravel implode array items to new lines

How can I make this nested location configuration use the correct path to call a php program?

php echo remove slashes from url [duplicate]

Assets not referencing to public folder (Laravel)

Generate random username based on full name php

loop through an anchor id

PHP: Calling MySQL Stored Procedure with Both INPUT AND OUTPUT Parameters (NOT "INOUT")

How to pass security cloudflare server with php curl

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

Insert And Retrieve Data in MySQL with $.post Noob Question

Laravel whole batch is cancelled if one Job fails

Codeigniter, Severity: error --> Exception: Too few arguments to function, admin dashboard shows HTTP error 500

backup files to google drive using PHP

About Contact Privacy policy Terms and conditions