I have made an admin panel that users can send tickets. In admin panel there is an alert section that whenever tickets comes it shows there. I'm saving all data about tickets, sent date and time in database. I want to do this: when a ticket comes I want to show to admin that when that tickets comes, like this:
if that ticket comes in five minutes ago till now it shows "Just now"
if that ticket comes in 24 hours ago till now it shows the time like:"18:25"
if the ticket comes in another day in past it shows date like "25 feb"
I am using php. sorry for my bad English :) so How can I do that?