Computer Science, asked by gmbshereen, 4 months ago

Write a PHP code to print numbers between 1-7 using to do... while loop statement​

Answers

Answered by anindyaadhikari13
1

Question:-

Write a photo code to print numbers between 1 to 7 using do while loop statement.

Code:-

Write this code in notepad or other IDE and save the code with extension .php

<?php

$x = 1;

do {

echo "$x";

$x++;

} while ($x <= 7);

?>

Output:-

1 2 3 4 5 6 7

Similar questions