Public feed #893526

Miscellany

public php v1 · immutable
Raw Edit
·published 2008-02-06 05:14 UTC
rendered paste body
function GetBetweenAll($find1, $find2, $string, $limit = 0){	if(!$limit){		$elements = array();		while($word = GetBetween($find1, $find2, $string)){			array_push($elements, $word);			$string = str_replace($find1.$word.$find2, null, $string);		}		return $elements;	}elseif($limit){		$elements = array();		$x = 0;		while($word = GetBetween($find1, $find2, $string) && $x < $amount){			array_push($elements, $word);			$string = str_replace($find1.$word.$find2, null, $string);			$x++;		}		return $elements;	}	}