How to display data potranno?


Warning: count(): Parameter must be an array or an object that implements Countable in /home/styllloz/public_html/qa-theme/donut-theme/qa-donut-layer.php on line 274
0 like 0 dislike
13 views
Hello tell me how to remove potranno $size $count $summa

in files just the rows we need to calculate the lines of a journal file and display the sum of all files and the size of a file page by page

$files = glob("../data/*.*"); $fnumber = '10'; foreach($files as $file){ $name[] = basename($file); $size = round(filesize($file)/1024,2); $count = count(file($file)); $summa += count(file($file)); } $counts = count($files); $pages = ceil($counts/$fnumber); $page = $_GET['page']; if(!$page OR $page==") { $nav_min = 0; $nav_max = $fnumber - 1; }else{ $nav_min = ($page * $fnumber) - $fnumber; $nav_max = ($fnumber * $page) - 1; } # Output for($i = $nav_min; $i <= $nav_max; $i++) { echo $name[$i]; // displays echo $size; // NOT displayed echo $count; // NOT displayed } echo $summa; // displays # Navigation for($fpr = " $i =1; $i <= $pages; $i++) { echo $fpr=(($i == 1 || $i == $pages || abs($i-$page) < 2) ? ($i == $page ? "[$i] | " : ''.$i.'  | ') : (($fpr == ' ... ' || $fpr == ")? ": '... ')); }
by | 13 views

1 Answer

0 like 0 dislike
echo $size; // NOT displayed echo $count; // NOT displayed

They are displayed, but they are null. You these variables are picked out of thin air
You have commented out the code where they were declared:
//$count = count(file($file)); // string //$summa += $count; //$size = round(filesize($file)/1024,2);
by

No related questions found

110,608 questions
257,187 answers
0 comments
40,796 users