i want to round $t 2e decimal to 0 or 5.
if $t= 1.31; //round to 1.30 if $t= 1.32 //round to 1.30 if $t= 1.33; //round to 1.35 if $t= 1.34; //round to 1
You can double the value so you can round to 1 decimal, then simple divide it by 2 again
$t = round(($t*2), 1) / 2;