Chrome Extension

Calculate length of a string using strlen() function in php

<?php
   echo strlen("foo bar"); 
?>
Best JSON Validator, JSON Tree Viewer, JSON Beautifier at same place. Check how cool is the tool
Output
Output will be : 7

To get the length of a string strlen() function is used in PHP. In the code, we have passed a string which has the value - 'foo bar'. It will return '7' as an output as the string length. 

Was this helpful?
0 Comments