Code: Select all
<?php
$thebox = strtolower($_POST['thebox']);
// get form input into thebox and make it all lowercase
print "$thebox <hr>";
// prints the lowercase text to be counted, with horizontal line
$ascii_array = (count_chars($thebox));
// counts the characters in the text, and returns them in an array with ascii keys, 0 to 255
$count_array = array_slice ($ascii_array, 97, 26);
// slices out the lower case alphabet (a = 97) into a new array (a = 0)
?>I know there'll be a simple answer, but please help, this is my first day with php.
Cheers!
-Ben