l104/H9/9.4.php
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<?php
function strip($string){
while(strstr($string,'<img')){
$posimg1 = strpos($string,'<img',0);
$posimg2 = strpos($string,'>', $posimg1);
if(isset($posimg1)){
$string = str_replace(substr($string,$posimg1,$posimg2-$posimg1+1),'',$string);
$string = str_replace('</img>','',$string);
}
}
while(strstr($string,'<a')){
$posa1 = strpos($string,'<a',0);
$posa2 = strpos($string,'>', $posa1);
if(isset($posa1)){
$string = str_replace(substr($string,$posa1,$posa2-$posa1+1),'',$string);
$string = str_replace('</a>','',$string);
}
}
echo $string;
}
?>
</body>
</html>
Resultaat
Made by Thijs Aarnoudse