Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision |
en:create:filter-texts [06.12.2014 15:04] – [Check If Something was Entered] alexander.ritter | en:create:filter-texts [06.12.2014 15:08] – [Compare Text] alexander.ritter |
---|
===== Check Minimum Length of Text ===== | ===== Check Minimum Length of Text ===== |
| |
''strlen()'' is another useful function. It returns the number of characters (length) in a string (text). If we know that any meaningful data must be made up of at least 4 characters, then the length of the string can also be checked. ''trim()'' is used here again so that any blank spaces do not implicate any wrong decisions. | ''strlen()'' is another useful function. It returns the number of characters (length) in a string (text). If we know that any meaningful data must be made up of at least 4 characters then the length of the string can also be checked. ''trim()'' is used here again so that any blank spaces do not cause any wrong decision-making. |
| |
<code php> | <code php> |
</code> | </code> |
| |
If there should not be any fuss between upper and lower case, writing ''strtolower()'' in lower case before comparison converts the participant's input. | If there should not be any fussiness between upper and lower case, writing ''strtolower()'' in lower case before comparison converts the participant's input. |
| |
<code php> | <code php> |