PHP在内部触发功能时切断尖括号

I have this String:

age>50;date<1.III.2011

And I need to change it to

1102.III.1<etad;05>ega

which is a reversed string.

All would be fine, if it wasn't for a fact that I have to pass this variable as a functions' argument like this:

function show_statistics($variable)
{
    echo $variable;
}

And when I trigger this function like this: show_statistics($string) it prints the reversed (that's been taken care of, not a big problem) but it cuts off everything between <> so it prints out:

1102.III.1ega.

If I don't pass it to the function in an argument (and trigger it inside) it's all working fine, doesn't cut off anything.

Please help me fix this problem, I've been thinking about it for a long time now.

Instead of

echo $variable;

use

echo htmlentities($variable);

To echo strings to the browser that may contain HTML entities especially < and > use htmlentities() for display.