<?php $missing = range(1, 5); $missingCount = count($missing); if ($missingCount) { if ($missingCount < 3) { $glue = ' and '; } else { $glue = ', '; $missing[] = 'and ' . array_pop($missing); } printf( 'Incomplete information received. The %s %s missing. Please check your inputs and try again.', implode($glue, $missing), $missingCount === 1 ? 'field is' : 'fields are' ); }
You have javascript disabled. You will not be able to edit any code.