Concisely checking the length of a trimmed string
<? if (strlen(trim("12345")) != 5) { print "Please enter a ZIP code that is 5 characters long."; } ?>