$myfile = fopen("test.txt", "r"); while(!feof($myfile)) { $line_str = fgets($myfile); $str_arr = count_chars($line_str, 1); arsort($str_arr); print_r(chr(key($str_arr)).' is '.current($str_arr).PHP_EOL); } fclose($myfile);
Copyright 2014-2024 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号