$arr = array('abcXYZ', 'AbCd1fgH7', 'xyz@!$wsp', '123', "\n\r\t", "\t\t");
foreach ($arr as $s)
{
if (ctype_cntrl($s))
echo "$s is only control characters <br />";
else
echo "$s is NOT only control characters <br />";
}
/*
run:
abcXYZ is NOT only control characters
AbCd1fgH7 is NOT only control characters
xyz@!$wsp is NOT only control characters
123 is NOT only control characters
is only control characters
is only control characters
*/