Calculating the Length of a String in PHP


Get the number of characters in a string with strlen().

Source Code

$string = "Hello World";
echo strlen($string); // Outputs: 11
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments