uhm .. try
if ($hour >= 6 AND $hour <= 12) {
// Your code here...
}
Very simple. Just compares hour to be greater than or equal to six and less than or equal to twelve. This range is inclusive of 6 and 12, if you truly want only the numbers between 6 and 12, i.e. 7..11 drop the = signs in the if statement. Hope that helps.
Chris King