Q:

How to get the current week, current month results data in PHP? 

How to get the current week, current month results data using PHP. 
This is the my table data:
   Uname    Type        subscribed_on
    Xxx     Free        1355835358
    Yyy     paid        1355555358
    Zzz     premium     1423835358

I am storing the data into the db is using time().  
Now how to get the uname from current week & month in PHP? 

A:

As of PHP 5.3 you can use DateTime class for datetime data. 
http://php.net/manual/en/datetime.settimestamp.php
<? php
$date = new DateTime();

$date->setTimestamp($yourTimestamp);
echo $date->format('W') . " \n"; // week number of the year
echo $date->format('m') . " \n"; // month
? >

