Targeting Certain Levels in the Membership Plugin

I would like to target certain levels of users in the Membership Plugin and output certain content based on their level. But I need to be able to do this with PHP, not with shortcode.

How can this be done?