Php

How to Check Password Strength in PHP

How to check Password Strength in PHP. When the user provides their account password, it always recommended validating the input. Password strength validation is very useful to see whether the…

How to reverse a string in PHP

The strrev() function is an built-in function in PHP which is used to reverse strings. Syntax: string – This parameter is required. It specifies the string to reverse. Example:

How to find string length in PHP

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…

How to combine two strings in PHP

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 :…

How to compare two strings in PHP

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…

How to append a string in PHP

There’s no exact function to append a string in PHP. But PHP concatenation assignment operator (.=) is used to append a string with another string. There are two string operators : Concatenation operator (‘.’) – Concatenation of…

How to prepend a string in PHP

There’s no exact function to prepend a string in PHP. But PHP concatenation operator (.) is used to returns the concatenation of its left and right arguments. There are two…