I have a custom view for nextGenGallery, in which i call the function "get_string_between".
If I perform a search that returns a page with this gallery view used, I get an error from Search Unleashed - presumibly becuase it is also trying to use the 'get_string_between()' function.
Fatal error: Cannot redeclare get_string_between() (previously declared in ...
is there a way that I can wrap the call i make to this function somehow so that it does not get called if it is already in use?
this is how it is called in my php:
<?php
//Used to break down and extract the width and height of each image
function get_string_between($string, $start, $end){
$string = " ".$string;
$ini = strpos($string,$start);
if ($ini == 0) return "";
$ini += strlen($start);
$len = strpos($string,$end,$ini) - $ini;
return substr($string,$ini,$len);
}
?>