ICC WORLD CUP 2011 WATCH LIVE ONLINE

How to get line of string from a text file

6:14 PM Posted by: Isuru Jayathissa 0 comments

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");?>

No comments:

Post a Comment

 


2009 Isuru's Blog. All rights reserved.
.
For the more details..,
keijayathissa@gmail.com