-1

How will I make a script that will count the number of a specific letter in a Lorem text? Like if I type d in the chat box it will display a number in the div of how many d’s there are in the text.

Zulrahking
  • 11
  • 2

1 Answers1

0

You can go through each character in the string, and use an associative array to keep a running tally. Then output the key and value of that associative array.

NiteRain
  • 663
  • 8
  • 14