I am guessing here, but it sounds like you are trying to echo or output a function that already outputs code itself. For example, if you do
echo print_r('Hello');
Then print_r will display Hello, then echo will display whatever the print_r function returns (usually 1 or 0). In which case you'd just need to remove the "echo".
If that's not it, please edit your question to put the relevant code in, otherwise we are really just taking guesses.