hi
i want to find the no of times a string occurs in a file and display the file based on the no of occurance
thanks

if its plain text you can use:
$f=file("./blah.txt");
$c=0;
for($x=0;$x<count($f);$x++){
if(strstr($needle,$f[$x]))$c++;
}

Sorting can be done with assosiative arrays and the command asort.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.