How to check whether a string has no whitespace in php?
To check whether a string has no whitespace, use the preg_match() in PHP.
1. Code:
2. Example:
Input:
string: "John Smith"
Output:
The string (John Smith) has the space
To check whether a string has no whitespace, use the preg_match() in PHP.
string: "John Smith"
The string (John Smith) has the space