First you would construct your string in your mirror_display() function something like..
function mirror_display() {
$string = "Line one.\n";
$string .= "Line two.";
// Then return the string to the calling
// function.
return $string;
}
$hello = mirror_display();
echo $hello would then produce.
Line one.
Line two.