How to use export function in php select drop down option


How to used export function drop down select option with data from MySQL datebase as option jQuery, Ajax and PHP mysql. How to enter and send id with name in Mysql database .How to fatch data in select drop down mysql menu bar option used jQuery, Ajax and PHP mysql and save in databse.

Split and separate the id and name with explode function and than save in  different different  variables in php

explode () function used to breaks a string into an array comma ,  for example  

$courseselectidc = explode(",", $courseselectex);

$couridselectid = $courseselectidc[0];


$couridselectname = $courseselectidc[1];