php - for with 3 values
<p>i have:</p>

<pre><code>@ = 1
# = 0,5
% = 0

max = 10
</code></pre>

<p>for example if i have: <strong>3</strong> then should show me:</p>

<pre><code>@@@$$$$$$$
</code></pre>

<p>if i have <strong>3,5</strong> :</p>

<pre><code>@@@#$$$$$$
</code></pre>

<p>etc</p>

<p>if i have 3,99 then = 3,5
if i have 3,49 then = 3,0</p>

<p>etc</p>

<p>how can i use this with foreach or for?</p>

<p>for whole number i can make:</p>

<pre><code>$number = 8;
$one = 10 - $number;
$three = 0 + $number;
</code></pre>

<p>and</p>

<pre><code>for($i=1;$i &lt;= $one){
  echo "@";
}

for($i=1;$i &lt;= $three){
  echo "$";
}
</code></pre>

<p>but how is the best solution if $number = 3,57</p>
