Below is the original few lines of code. which work
Code: Select all
//this bit assigns the array element to a var.
$entry_0=($entries[0][entrymsg]);
//This bit strips off extra line breaks.
$entry_0 = str_replace('
','', trim($entry_0));
//hardcoded line break neccessary.below is my attempt at making a function out of it. it doesnt work!
Code: Select all
function striplb($tempentry)
{
$tempentry = str_replace('
','', trim($tempentry));
return $tempentry;
}
$entry_0=($entries[0][entrymsg]);
striplb($entry_0);
print($entry_0);Any help on fixing this function would be greatly appreciated..
cheers!