$select_query2 = "SELECT * FROM EmployeeBirthdayDetails Order By E_ID";
$employeedetails = mysql_query($select_query2);
$emp_details = array();
$j =0;
while($row2 = mysql_fetch_array($employeedetails))
{
$emp_details[$j] = $row2;
$j++;
}
echo "<table border='1' width='100%'>
<tr>
<th>Employee ID</th>
<th>Employee Name</th>
<th>Date Of Birth</th>
<th>Edit</th>
<th>Delete</th>
</tr>";
for($i=0;$i<sizeof($emp_details);$i++)
{
$empId=$emp_details[$i]['E_ID'];
echo "<tr>";
echo "<td>" . $empId . "</td>";
echo "<td>" . $emp_details[$i]['B_E_Name'] . "</td>";
echo "<td>" . $emp_details[$i]['B_E_DOB'] . "</td>";
echo "<td align='center'>"."<a href='#' onclick='editdetails(".$empId.");'>Edit</a></td>";
echo "<td align='center'><a href='#' onclick='deletedetails(".$empId.");'>Delete</a></td>";
echo "</tr>";
}
echo "</table>";
I want to display the table data in ascending order. But its displayed in the order in which i added it to the table.