Try the common syntax instead:
if (strlen($message)<140) {
echo "less than 140";
}
else
if (strlen($message)>140) {
echo "more than 140";
}
else {
echo "exactly 140";
}
More Related Contents:
- Find a match pattern of any digit and space with any character in a string and replace with | in PHP [closed]
- What is the difference between single-quoted and double-quoted strings in PHP?
- How can I combine two strings together in PHP?
- Array to String PHP?
- How to generate all permutations of a string in PHP?
- Remove multiple whitespaces
- PHP convert string to hex and hex to string
- Converting an integer to a string in PHP
- PHP substring extraction. Get the string before the first ‘/’ or the whole string
- Is a new line = \n OR \r\n?
- Title case a string containing one or more last names while handling names with apostrophes
- Php – regular expression to check if the string has chinese chars
- How to get first x chars from a string, without cutting off the last word?
- Getting the first character of a string with $str[0]
- PHP: Split multibyte string (word) into separate characters
- What does the b in front of string literals do?
- Highlight keywords in a paragraph
- Search and replace multiple values with multiple/different values in PHP5?
- Explode string into array with no empty elements?
- Get the sum of all digits in a numeric string
- Separate space-delimited words in a string [duplicate]
- Reverse the letters in each word of a string
- How to separate letters and digits from a string in php
- How to implode array with key and value without foreach in PHP
- How does PHP compare strings with comparison operators?
- PHP string doesn’t allow < and > characters
- Remove first 4 characters of a string with PHP
- PHP extract link from tag [duplicate]
- Check if string contains word in array [duplicate]
- PHP Find all occurrences of a substring in a string