Count number of characters in PHP

Download
Download is available until [expire_date]
  • Version
  • Download 104
  • File Size 396.92 KB
  • File Count 1
  • Create Date September 14, 2016
  • Last Updated September 14, 2016

Count number of characters in PHP

Count number of characters in PHP

Sample script in PHP that will count the number of characters entered by the user in a textbox.

PHP Script:

< ?php
        	if(isset($_POST['send']))
        	{
        		$str = $_POST['string'];
        		echo "There are ".strlen($str)." character(s)";
        	}
?>
, , , ,

Post navigation

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.