I need help writing a program that outputs the number of characters, words, and lines of the given input.
This is what I have so far. It counts how many characters there are, but not the amount of words and lines.
<?php
if (isset($_POST['Submit1']))
{
echo "characters: = " . strlen($_POST["name"]);
}
?>
<form method="POST" action="dummy.php">
text : <input type="text" name="name"></br></br>
<input type="submit" name="Submit1" value="analyze">
</form>