PHP Date Time Tips - Part 11: Do you want to find the number of days in a particular year? You can use date() function with the "z" modifier. Like this:
<?php
// get number days of year for 2008
// result 366
echo date("z", mktime(0,0,0,12,31,2008)) + 1;
?>