Similar to Lloyd's answer, but works with any size array.
$missing = array();
$missing[] = 'name';
$missing[] = 'zipcode';
$missing[] = 'phone';
if( is_array($missing) && count($missing) > 0 )
{
$result = '';
$total = count($missing) - 1;
for($i = 0; $i <= $total; $i++)
{
if($i == $total && $total > 0)
$result .= "and ";
$result .= $missing[$i];
if($i < $total)
$result .= ", ";
}
echo 'You need to provide your '.$result.'.';
// Echos "You need to provide your name, zipcode, and phone."
}