The empty() function is an built-in function in PHP which is used to check whether a variable is empty or not. A variable is empty if it does not exist or if…
The isset() function is an built-in function in PHP which is used to check whether a variable is set or not. The isset() will return true if testing a variable…
The PHP strlen() is used to get the length of a string. It also includes the white spaces inside the string. Syntax: string – This parameter is required. It specifies the length…
The rtrim() function is a built-in function in PHP which is used to removes whitespace from the end of a string. Syntax string – This parameter is required. It specifies the…
The ltrim() function is a built-in function in PHP which is used to removes whitespace from the beginning of a string. Syntax string – This parameter is required. It specifies the…
The ucfirst() function is used to change the first character of a string to uppercase. Otherwise, We can use the strtolower() function in combination with the ucfirst() function, if you need to make only first…
The strtoupper() function is used to converts a string to uppercase. All other special characters or numeric characters in the string remains unchanged. This function is binary-safe. Syntax string –…
The strtolower() function is used to converts a string to lowercase. All other special characters or numeric characters in the string remains unchanged. This function is binary-safe. Syntax: string –…
We can use the PHP concatenation operator (.) to join or combine two strings together in PHP. This operator is exactly designed for strings. There are two string operators :…
The explode() function is an built-in function in PHP which is used to break or split a string into an array by a separator string like comma, hyphen, space etc. This…
The implode() or join() is a built-in function in PHP and it is used for creating a string by joining the elements or values of an array with a glue string like…
strcmp() function is used to compare two strings in php. This function is case-sensitive and binary-safe. If we need case-insensitive comparison, we can use the strcasecmp() function. Syntax string1 – This parameter…