How can I format a number with commas in PHP? Example code: - Biz Tech

How can I format a number with commas in PHP? Example code:

$number = 1234567.89;

echo number_format($number);