How to find a string on document and then echo the string?
Posted
by
henrymb67
on Stack Overflow
See other posts from Stack Overflow
or by henrymb67
Published on 2012-07-01T14:54:57Z
Indexed on
2012/07/01
15:16 UTC
Read the original article
Hit count: 193
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 (:
© Stack Overflow or respective owner