Hello, having a slight problem here..
I have a string, that I need to do character analysis on - Basically finding out how many times "B" is in the text and then ordering this from (lowest to highest). Now I can get the results, but, I don't know how to sort them. Any ideas?
<?php
$string = "This is a test.";
foreach (count_chars($string, 1) as $i => $val) {
echo "There were $val instance(s) of \"" , chr($i) , "\" in the string.\n";
}
?>
And the output would be something like:
String: T H I S I S A T E S T
Obviously not actual results but you know :)
Hope it's descriptive enough!