Many plants do this, with varying degrees of specialization - for some it is perhaps incidental, others have evolved this strategy to gain nutrients (often water as well). You are probably thinking of bromeliads, a diverse group of plants in which many species have specialized leaves that form cups at the base to collect water and litter. These structures, a type of phytotelmata, have similarities to some carnivorous plant traps.
These tank bromeliads are able to efficiently absorb nutrients from animal or plant matter which falls into the tank:
Considerable absorbed nitrogen is mobilized in the rosette center. Tested bromeliads appear to be well equipped to utilize minerals and organic nitrogen originating from tank-impounded plant and animal debris as nutrients.
This litter catching habit occurs in other lithophytic and epiphytic plants, i.e. those which don't grow in soil, because it allows them to capture nutrients when growing on rocks or trees. Examples include the staghorns/elkhorns and basket ferns:
They form a characteristic 'basket' that collect litter and organic debris, hence the common name. The collected debris decompose into humus, providing the plants with nutrients it would otherwise not have received from being suspended above the ground.