I have this php code, this I have allready tried:
<?php
foreach (glob("somefolder/*/*/wdl.txt") as $somevar) {include $somevar;}
?>
and this code output this:
WIN DRAW LOSE WIN WIN DRAW WIN DRAW
Now i want make this output variables that tells how many win i have, how many draw, and how many lose.
for example the variable when I echo the $wins
variable will have output 4 becouse of 4 WIN.
How I can do that? thx.
each wdl.txt conteins only LOSE or DRAW or WIN . BUT!! I think contains: ''LOSE '' (with a space at the END).