How to find a string on document and then echo the string?
- by henrymb67
How do you find a string on document and then echo the string?
For example,
The document:
blah blah result.php?whatiwanttoecho blah
or:
blahhh result.php?whatiwanttoecho blah blah blah
There will always be 'result.php?' before what I want to echo.
The end result I'm looking for:
$doc = "./doc.txt";
$doccontents = file_get_contents($file);
Then the code that I need help that has the end result of:
$result = 'whatiwanttoecho';
echo $result;
Hope this makes sense. Thanks (: