function strip_html($xml_tag,$xml_data){ $s1 = "<".$xml_tag.">"; $s2 = ""; $s = $xml_data; $s1 = strtolower($s1); $s2 = strtolower($s2); $L1 = strlen($s1); $scheck = strtolower($s); if($L1>0){$pos1 = strpos($scheck,$s1);} else {$pos1=0;} if($pos1 !== false){ if($s2 == '') return substr($s,$pos1+$L1); $pos2 = strpos(substr($scheck,$pos1+$L1),$s2); if($pos2!==false) return substr($s,$pos1+$L1,$pos2); } return ''; } $a = "a"; $url = "http://www.streamservice.nl/"; $strip_html = strip_html($url, $a); echo $strip_html;