- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
$string=$_GET['textarea'];
$Words = explode(" ", $string);
$Freq = array();
for($i=0; $i<20; $i++)
{$Freq[] = 0;
}
foreach($Words as $k=>$v)
{
$length = strlen($v);
$strlength = intval($length);
$Freq[$strlength] += 1;
}
foreach($Freq as $k=>$v)
{if ($v > 0)
echo "Number of words with $k letters: $v <br>";
}
guest 07.11.2009 09:49 # +1
striker 07.11.2009 09:50 # 0
guest 07.11.2009 11:35 # +4
gorky 07.11.2009 11:52 # 0
striker 07.11.2009 12:14 # 0
guest 07.11.2009 14:59 # 0
guest 09.11.2009 12:15 # 0
guest 27.11.2009 21:56 # 0
$length = strlen($v);
$strlength = intval($length);
guest 26.05.2010 19:56 # 0