PDA

View Full Version : Between function in PHP?



Raskolnikov
12-21-2007, 11:52 PM
Is there a function in PHP that parses the info in something like SRL Stats.
I know how to get the data, but, how do I parse the data? Can someone give me an example?

n3ss3s
12-22-2007, 08:05 AM
You have to make it yourself, but I'll give you one:



function get_string_between($string, $start, $end){
$string = " ".$string;
$ini = strpos($string,$start);
if ($ini == 0) return "";
$ini += strlen($start);
$len = strpos($string,$end,$ini) - $ini;
return substr($string,$ini,$len);
}

Raskolnikov
12-23-2007, 11:09 PM
I also need help with actually getting the data? I tried using the one Markus suggested on your help thread but it didn't work. Help!

n3ss3s
12-25-2007, 04:43 PM
Lol - drama:

"You're nobody to tell me what to do!"

/run and hide

:p


cut em2 it, it does work fine for my php code that creates my sig?