Author

Topic: Count files in a directory where name = and output number to a variable... (Read 277 times)

legendary
Activity: 1064
Merit: 1001
This is to do with making something on my crypto site a bit easier as in the long one it will be one less thing for me to manually manage, anyway...

I need to count files in folder (path/to/me) who's names match *_lottery.inc.php where the * is a wild card since files might be named such as...

hello_lottery.inc.php
and_lottery.inc.php
goodbye_lottery.inc.php

So the output would be 3

Can someone please write a bit of PHP for me that will do this ?

Ty.


Problem solved.
Jump to: