Grazie Las! funge perfettamente!

if(strpos($prezzo, ",") != FALSE){
$prezzo=str_replace(",",".",str_replace(".","",$pr ezzo));
}