[PHP]Compare dates

Hi.

I have an application that stores some dates in unix timestamp format, and I need to compare those dates.
More exactly I need some sort of if-statements that checks how long time it is from todays date untill the timestamp and store it into variables.
When it's done, I need to have the output echoed so that I get an consecutive string like this:
John Doe, 10|Jane Doe, 5|

In the example above it shows both names and days left untill timestamp, I need to add more things too, it's just the comparing of the timestamps I need help with, as I have no clue of how to compare them and tell how many days there are between todays date and the timestamp.
It should be rounded down to the nearest lower day, so if there are 5.9 or 5.1 days left, it should only say 5 days.

Anyone who understand my need and can help me?
Many thanks in advance!

You can use something like this:

$days = (strtotime("2009-11-20") - strtotime(date("Y-m-d"))) / (60 * 60 * 24);

Then creating the concatenated string is trivial.
Creating a date out of a timestamp requires something like the following:

date("Y-m-d", mktime(0, 0, 0, 11, 20, 2009));