number_format() e' una funzione di php.

$new_format = NUMBER_FORMAT($results['importocorso'], 2, ',', ' ');

echo $new_format;