I want to get the replace a number in a string after multiplying it by a variable. I have the following PHP:
$desc = "+2.23% critical damage";
$count = 3;`
Now I want to use the value of $count * $desc
within a new string, as shown here:
$sum = "+6.69% critical damage";
How do I manage this? How can I multiply the numbers in this string with $count
?