Robbie shows us how a PHP Function can be used not only to save redundant input in your PHP code, but also to do something intelligent. In our live example, we write a code to detect whether an array has just one or multiple items, and output verbiage to suit.