PHP - go to position in the data string

JackTheKnife

Limp Gawd
Joined
Mar 27, 2006
Messages
272
I have a big data string where I'm searching for a needle position (strpos). Is there any way to go to positions right behind a needle (strpos + strlen)?

I have something like:

$x = strpos($data,$value);
$y = $x + strlen($value);
$follow = strstr(substr($data, $y, $offest),'|');

but in that case I need to set $offset of the data behind the "|" not just simple jump after that and add new data there :\
 
Last edited:
You should describe your problem at a higher level, it's still not clear to me what you're trying to do. Give example input and output.
 
Back
Top