What are the potential pitfalls of using the INT data type in MySQL for storing numbers, and how can PHP help in formatting them for display?

Using the INT data type in MySQL for storing numbers can lead to potential pitfalls such as limited range (maximum value of 2147483647 for signed INT) and lack of support for decimal numbers. To address this, PHP can help in formatting the numbers for display by using functions like number_format() to add commas for readability and ensure proper handling of large numbers.

// Example code snippet to format an INT number for display
$number = 1234567890;
$formatted_number = number_format($number);
echo $formatted_number; // Output: 1,234,567,890