How Can I show user what Subscription he is using and how

How Can I show user what Subscription he is using and how many days left from Subscription.

I need php functions for these.