Bitcoin Forum

Other => Off-topic => Topic started by: MoreBloodWine on June 13, 2015, 04:48:06 AM



Title: Count files in a directory where name = and output number to a variable...
Post by: MoreBloodWine on June 13, 2015, 04:48:06 AM
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.