/ Published in: PHP
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<?php $f = "test.txt"; // get string // count characters echo "This file has ". $numChar . " character(s)"; // count characters without spaces echo "This file has ". $numChar . " character(s) without spaces"; // count words echo "This file has ". $numWords . " words"; ?>