fruit php function as a foreach