Echo whole numbers (from array) from calculation from item price
<p>I have a tricky question and would appreciate some suggestions.</p>

<p>A customer sets a price, then that price determines the number of customers that can purchase the item.</p>

<p>I think im looking to have an item price set from a form, then carry out a calculation in a loop, hold this in an array then echo out only whole numbers from the array to an options box which is populated by ajax onlclick. </p>

<p>At least I think thats how to do it.</p>

<p>E.G </p>

<p>itemPrice=50, therefore only the following no of customers can purchase the item.
50,25,10,5,2 or 1 as these are the only whole numbers from the calculation (this should be offered as a combo box or slider).</p>

<pre><code>$itemprice = 50
for ($i=1, $i &lt; $itemprice, ++$i) {
$array .= $i
}

for each {
is_int($array){
$NoOfCustomersList .= &lt;option value="$NoOfCustomers"&gt;$NoOfCustomers&lt;/option&gt; 
//(or jQuery slider)
}
}
</code></pre>

<p>DISCLAIMER </p>

<p>At least this is how it would look in my mind, I am new to php so the above may be jibberish</p>
