I would like to calculate, in PHP, the percentage of a number. For example:
$percentage = 50;
$totalWidth = 350;
For this example, 50% of 350 = 175
How can I do that?
$percentage = 50;
$totalWidth = 350;
$new_width = ($percentage / 100) * $totalWidth;