How can PHP handle input values with commas instead of periods for decimals?

When dealing with input values that use commas instead of periods for decimals in PHP, you can use the `str_replace()` function to replace commas with periods before processing the input as a decimal. This will ensure that PHP interprets the input correctly as a decimal number.

$input_value = "1,234.56";
$decimal_value = (float) str_replace(',', '.', $input_value);

// Now $decimal_value will be 1234.56