str_replace?!?! What do I do wrong?

I’m trying to make 2 rules with str_replace.

$currpoints = $row2['points'];
$points = str_replace(".5", "½", $currpoints);
$points = str_replace(".0", "", $currpoints);

It seems like the last str_replace overrules the first… How do I get past that?

Thanks in advance…

Look closely at the variable you are passing into the function at the end of str_replace… You’ll figure it out.

$currpoints = $row2[‘points’];
$points = str_replace(“.5”, “½”, $currpoints);
$points = str_replace(“.0”, “”, $points);