DEFINITION

function surround($surround_this, $withthis = '', $andthis = '', $when_empty = '', $surround_when_empty_as_well = FALSE, $check_plain = TRUE)

This function will surround a text string with whatever you define the $withthis and $andthis variables.

$surround_this = The string you want to surround
$withthis = The prefix you want to append to the string
$andthis = The suffix you want to append to the string
$when_empty = If the string was empty then we replace the empty string with this variable and surround it.
$surround_when_empty_as_well = a boolean to determine if you should surround the variable you passed in as $surround_this even if the string was empty.
$check_plain = True = Use the check_plain() function on the return value. False = disable check_plain()

RETURN VALUE
text string

EXAMPLES

$with_this = 'this ';
$surround_this = 'is a';
$and_this = ' test';

$test = surround($surround_this, $with_this, $and_this);
//output:  'this is a test';