Shows me Error :
Warning: strpos() [function.strpos]: Offset not contained in string
Code is
function trimSearchURL($URL, $Pos, $end = '&')
{
if ($Pos) {
$nEndPos = strpos($URL, $end, $Pos);
if ($nEndPos === false) {
$URL = substr($URL, $Pos);
} else {
$URL = substr($URL, $Pos, $nEndPos - $Pos);
}
}
return $URL;
}
$Pos appears to be larger than the string in $URL is long