Peuplarchie Posted December 10, 2008 Share Posted December 10, 2008 Good day to you all, I'm wondering how can I count files in a directory that as a specific word in a specific line number which would be : // I know how to count folder... function CountDir($aDir, $aRecurse) { $Count = 0; $d = dir($aDir); while ($Entry = $d->Read()) { if (!(($Entry == "..") || ($Entry == "."))) { if (Is_Dir($aDir . '/' . $Entry)) { if ($aRecurse) { $Count += CountDir($aDir . '/' . $Entry, $aRecurse); } } else { $Count++; } } } return $Count; } // I would need to include something like this iguess.. if ($lines[$line13] == "Pending"){ count++ } Thanks ! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.