Im learning PHP in my second year at uni this year (at Anglia Ruskin Cambridge)
Im sort of struggling to get my head around it- I think I have figured out the first part of coding ive been asked to do, but would like someone to check it over for me please?
The question I was asked was: 2.2.2 Using the do while construct write a PHP program to calculate 10! (10 factorial) and output the result.
Please can you tell me if this is the correct solution? Im unable to test it because Im writing the code in notepad as I dont have proper coding software on my personal laptop I can only access it at university. The only history of any sort of language I have to go on is a couple weeks with C#
[php]echo “Let’s Count To Ten”;
$countdown =0;
do {
echo $countdown."… ";
$countdown = $countdown + 1;
)
while ($countdown<10);
echo $countdown;
[/php]
thank you very much
Basil