function getstrline($searchstr, $file){$myfile = file($file);$key = array_search($searchstr, $myfile);
return ("'$searchstr' at line nomber: $key");
}
Echo getstrline("This is the String that we want to find", "sometest.txt");?>
ICC WORLD CUP 2011 WATCH LIVE ONLINE
How to get line of string from a text file
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment