How to transform (KD) number into win percentage in PHP
<p>I need to calculate a win loss ratio from my app in PHP (Laravel 5.2)</p>

<p>I have these two numbers:</p>

<pre><code>$array['WinLoss'] = $array['GamesWon'] / $array['TotalGamesLost'];
</code></pre>

<p>Which gives me:</p>

<pre><code>Win: 480

Loss: 400
</code></pre>

<p>I tried doing this in my view:</p>

<pre><code>{{ round((float)$WinLoss * 100) . '%' }}
</code></pre>

<p>but it gives me 120%. Thats obviously not correct, it should be around 58%</p>

<p>How would I calculate to show around 58% not 120%?</p>