1 to 3 of 3
function PrependString($Prepend, $String) { if ($String == '') return ''; if (is_array($Prepend)){ foreach ($Prepend as $str) { $pos = strpos(strtolower($String), strtolower($str)); if ($pos !== false && $pos == 0) { $Prepend = ''; } } // If the string doesn't start with any array elements, prepend the first element if ($Prepend <> '') $Prepend = $Prepend[0]; } else { $pos = strpos(strtolower($String), strtolower($Prepend)); if ($pos !== false && $pos == 0) $Prepend = ''; } return $Prepend.$String;}
Bug Tracker
Vanilla 1.1.5 is a product of Lussumo. More Information: Documentation, Community Support.