Before asking for help I would like to clarify that I don't have advanced skills on PHP. What I want to achieve is to display different messages for every period of time that I set (I need this to LOOP every day). After reading this -> http://codex.wordpress.org/Function_Reference/current_time I tried to check:
$my_time = current_time('mysql');
if ($my_time >= 14 && $my_time <= 16) {
echo 'Do your homework';
} else if ($my_time > 14 && $my_time <= 18) {
echo 'Clean up the house';
} else if ($my_time > 18 && $my_time <= 20) {
echo 'Go Shopping';
.
.
.
.
.
} else {
echo 'Lets start over!'
}
Where 14, 16, 18, 20 is the time (24hour format). However this did not work. When I echo current_time('mysql'), it returns the date and the time so even if it could work, it wouldn't loop because of the date, right? Thanks in advance.