Does anyone have a script to look for X number of times something is found??
for example:
code:
$variable = what to look for
$file = file to open
open $file
$line = readline (1)
$x = 1
$result = $x # of times found
open $file
while @error = 0
if instr($line,$variable)
$result = $x
endif
$line = readline(1)
$x = $x + 1
loop
close $file
? $result

I can't seem to the code right. Any help appreciated.