Home and Learn: PHP Programming Course
To get the length of a string in PHP use the strlen function. The length is how many characters are in the string:
$string_length = strlen( "This is some text" );
The above line of code returns a value of 17 - the number of character and spaces in the string.
Email us: enquiry at homeandlearn.co.uk