In looking at my Google Analytics statistics, I see a lot of visitors searching for PHP shorthand if/else (ternary) information. I’ve gone through my code library and picked out some examples of ternary operator usage.
Data validation is an important aspect of form processing. In this article we’ll present two PHP functions for data validation which may be useful to WordPress plugin authors. These are: email validation with domain checking and url validation with domain checking. Both of these are rather comprehensive tests.