function price($price){
if($price >= 1000){
$price1 = round($price / 1000, 0);
$price2 = substr($price, -3);
return $price1 . '<span style="font-size: 0,9; color: red;">' . $price2 . '</span>';
}
else{
return $price;
}
}
<span class="PricebasePriceWithTax"><?=price($price);?></span>