Hi,
Need Suggestion for hiding a div from 9Pm to 9Am.

What about:

<?php
if(date('H') > 9 || date('H') < 21) {
    // Show div.
}

That should be &&, and the comparison reversed.

Woops, my bad :). Should be && indeed. Don't see why the comparison should be reversed, though.

LOL, that's my bad ;)

Teamwork :p

Member Avatar for diafol

This is for your server's timezone I take it?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.