How can PHP be used to convert numbers from one format to another, such as from "1000000" to "1.000.000"?
To convert numbers from one format to another in PHP, you can use the number_format() function. This function allows you to format a number with grouped thousands and specify the number of decimal points. By using number_format(), you can easily convert a number like "1000000" to "1.000.000".
$number = 1000000;
$formatted_number = number_format($number, 0, ',', '.');
echo $formatted_number; // Output: 1.000.000