PHP Code:
private function GetStringBetween($String, $Start, $End){
if($String != "" && $Start != "" && $End != ""){
$Pos_1 = strpos($String, $Start);
$Pos_2 = strpos($String, $End, ($Pos_1 + 1));
if(is_numeric($Pos_1) && is_numeric($Pos_2)){
$Between = substr($String, ($Pos_1 + strlen($Start)), ($Pos_2 - $Pos_1 - strlen($Start)));
if(strlen($Between) > 0){
return $Between;
}
}
}
return false;
}
Results 1 to 1 of 1
Thread: [PHP] GetStringBetween Function
- 16 Nov. 2009 06:01am #1
- Age
- 30
- Join Date
- Nov. 2009
- Location
- Anaheim, California
- Posts
- 1,065
- Reputation
- 99
- LCash
- 500.00
[PHP] GetStringBetween Function