How can comma separated and split string in drop down select option

Description

How to create comma separated and split string in drop down option from array in PHP  How can used select option export function in php ajax jQuery, mysql. 

How can used comma separated and split string  export function into an array in PHP

$coursetext= $_POST['courseselectget'];

$courmain = explode(",", $coursetext);

$couridsectid = $courmain [0];

$couridctname = $courmain [1];

<select class="form-control" id="courseselect" >

<?php

$showst=mysql_query("Select * from seletableh order by id desc");

 while($rowlinkst=mysql_fetch_array($showst)){?> 

 <option value="<?php echo $rowlinkst['id']; ?>,<?php echo $rowlinkst['namest']; ?>"><?php echo $rowlinkst['namest']; ?></option>

<?php } ?>

</select>

and now submit form