<?php
$query = mysql_query("select * from `tbl_student`");
while($data = mysql_fetch_array($query))
{
$output[] = array ($data[0],$data[1],$data[2],$data[3],
'<select class="form-control select1" id="'.$data[0].'">
<option 'if(----){'selected'}'>asd</option>
<option >dasd</option>
<option>asd</option>
</select>');
}
echo json_encode($output);
?>
<!--here code of if() throw error-->