Randomly generate 200 lowercase English letters and count the number. This is a particle I saw online. I would like to ask how to make it simpler?-PHP Chinese Network Q&A
Randomly generate 200 lowercase English letters and count the number. This is a particle I saw online. I would like to ask how to make it simpler?
Deities
Deities 2021-11-03 21:36:45
0
5
1131


      

      

      

      

      

      


      

      

      

      

      
$z=adbqhwbqjuyguqwgyquiwguyquwehqwuiepoqiuwepoqiuwpoiqwepiqwruweroiuyiqazxswedcvfrtgbnhyujmkilopplmkoijnbhuygvcftrdxzsewqa;

      
$a="abcdefghijklmnopqrstuvwsyz";

      
for($i=0;$i
      

      
$s=$a[$i];

      
$b=0;

      
for ($j=0;$j
      

      
if ($a[$i]==$z[$j]){

      
$b+=1;

      
}

      
}

      
echo $a{$i}."出现的次数:".$b."
";

      
}

      
?>

      
1

      

      

      

      

      

      

      
# PHP

Deities
Deities

reply all (1)
逆旅行人

Random uppercase letters chr(rand(65,90)); Random lowercase letters chr(rand(97,122)); can simplify entering so many characters

  • reply What I want to ask is how to simplify the output and output 200 lowercase English characters at one time
    Deities author 2021-11-04 11:22:13
  • reply Use loop
    autoload author 2021-11-04 13:55:33
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!