title: How do I calculate the percentage of a number?
body: <p>I would like to calculate, in PHP, the percentage of a number. For example:</p>
  
  <pre><code>$percentage = 50;
  $totalWidth = 350;
  </code></pre>
  
  <p>For this example, 50% of 350 = 175</p>
  
  <p>How can I do that?</p>