I want to print only year of date store in table example if 2001-12-29 stored in db table so print only number.
<?php
include_once("connect.php");
if($search=mysql_query("SELECT year( Date_Of_Admission ) FROM student_enroll where Seat_Number='$_POST[seat]'"))
{
//echo "<br/>";
echo "<table border='1'>
<tr>
<th>Seat Number</th>
<th>Batch</th>
</tr>";
while($row=mysql_fetch_array($search))
{
echo "<tr>";
echo "<tr>";
echo "<td>".$row['Seat_Number']."</td>";
echo "<td>".year."</td>";
echo "</tr>";
}
echo "</table>";
}
?>
how i print only year??