Location: PHPKode > projects > PhpWebDesk > phpWebDesk/functions.inc.php
<?php
//
// phpWebDesk functions file
//
// Since I'm not using php5 CVS, I need these case insentitive functions.

function stripos($haystack, $needle, $offset=0){

 $haystack = substr($haystack, $offset, strlen($haystack) );

 $temp = stristr($haystack, $needle);
 $pos = strlen($haystack) - strlen($temp);
 If ($pos == strlen ($haystack) )
   $pos = FALSE;
 else
   $pos += $offset;

 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 ) );
}
?>
Return current item: PhpWebDesk