Do While Loops
Do Loops
fgr
<h1>Mr. C. - Big Spender</h1>
<p>Mr. C. likes to take his ladies out and money is no object.
He goes all out and spends at leat $15.00 per date, but once
he only has $10.00 dollars, he stops spending and buys himself
a taco.</p>
<table>
<?php
$dollars = 15;
Do
{
echo "<tr><td>";
echo "Hey, doll, I'm loaded with cash! ";
echo " I have ".$dollars." dollars!";
echo "</tr></td>";
$dollars=$dollars-1;
}
while ($dollars > 10) ;
if ($dollars == 10)
{
echo "<tr><td>:";
echo "Oh, oh...time for a taco!";
echo "</td></tr>";
}
?>
</table>