I just got this figured out:
$dates = date(" d-m-y",$forum_tid);
if ($dates == date(' d-m-y')) {
$day_name = 'This day';
} else if($dates === date(" d-m-y", strtotime("-1 day"))) {
$day_name = 'Yesterday';
} else {
$day_name = 'Another day';
}
echo "$day_name";
Now this runs by 24 hours clock-system. Now I want it to work by dates. (If the time is the same day, it says "This day", if it was the date before f.ex 23-08-13, then it shows "Yesterday")
How exactly do I do this? Hope this is a question more people is wondering about!