Location: PHPKode > projects > PhpWebDesk > phpWebDesk/templates/test.php
<!doctype html public "-//W3C//DTD HTML 4.0 //EN">
<html>
<head>
       <title>Title here!</title>
</head>
<body><pre>
<?php

function stripos($haystack, $needle) {
    $temp = stristr($haystack,$needle);
    $pos = strlen($haystack)-strlen($temp);
    return $pos;
}

function stri_replace( $find, $replace, $string )
{
   $parts = explode( strtolower($find), strtolower($string) );
   $pos = 0;
   foreach( $parts as $key=>$part ){
       $parts[ $key ] = substr($string, $pos, strlen($part));
       $pos += strlen($part) + strlen($find);
       }
   return( join( $replace, $parts ) );
}


$content = "<hhhh><image src='ggg'>";
$imagepointer = 0;
while(stristr(substr($content, $imagepointer),"<image"))  {
    echo ".";
    $start=stristr(substr($content, $imagepointer),"<image")+$imagepointer;
    $end=stripos(substr($content, $start), ">")+($start+1);
    $tochop=substr($content, $start, ($end-$start));
    $content = stri_replace($tochop, "", $content);
    $imagepointer = $end;
}
echo $body;
?></pre>
</body>
</html>
Return current item: PhpWebDesk