A ver, te explico:
Código PHP:
number_format(numero,'NºDecimales','separador_de_decimal','separadorde_miles')
En tu ejemplo:
Código PHP:
$numero='3545.2658';
echo number_format($numero,'3',',','.');
Por cierto la explicacion en castellano:
http://es2.php.net/manual/es/function.number-format.php
Saludos.