What is the correct way to concatenate two variables in PHP to create a decimal number?

When concatenating two variables in PHP to create a decimal number, you need to ensure that the decimal point is included between the two variables. One way to achieve this is by using the dot (.) operator to concatenate the variables along with the decimal point. This will combine the two variables into a single string representing a decimal number.

$variable1 = "3";
$variable2 = "14159";

$decimalNumber = $variable1 . "." . $variable2;

echo $decimalNumber; // Output: 3.14159