PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
I guess my question is simple but at the moment I don't know how to do it.
I would like to do following: Parse a string (one webpage) for 72393. If I find 72393 in the page I want to "pull out" a string 50 characters
ahead of 72393 (including 72393). How do I do that?
How about 50 characters ahead of 72393 and 50 characters behind 72393?
For example:
company Name<br>
Street 5<br>
72393 Example-City<br>
The extracted string should then be changed to a array of string (using explode).
Orders results so that $matches[0] is an array of full pattern matches, $matches[1] is an array of strings matched by the first parenthesized subpattern, and so on.
That looks good, but what if I wanted
50 characters before 72393
or
50 characters before and after 72393.
=>All I just want is a "range" or "intervall".