Php, out-pay of coins
<p>If one were to make a "vending machine" and you would write in how much you would pay and if you paid £100 for a £2 item, then make it echo the amount you get back, and then echo the amount in coins (1p,5p etc. If you get my drift.) how would you do the echo'ing of coins?</p>

<pre><code>$valg = $_POST['select'];
$pris = $_POST['pris'];

$r_pris = explode(" ", $valg);
$resultat = $r_pris['1']-$pris; 

if ($resultat&lt;0){
    $slut_pris = "du skal have " . $resultat . " kroner tilbage";
} elseif($resultat==0){
    $slut_pris = "lige og plet på.";
}
else {
    $slut_pris = "du mangler " . $resultat . " kroner";
}
</code></pre>
