Computer Science, asked by rohit3968, 1 year ago

write a program in PHP to generate first 20 natural numbers​

Answers

Answered by Anonymous
3

Hi

/* Code */

<? php

   for ($x = 1; $x <= 20; $x++) {

       echo "$x <br>";

   }

?>

/* Output */

1  

2  

3  

4  

5  

6  

7  

8  

9  

10  

11  

12  

13  

14  

15  

16  

17  

18  

19  

20

Similar questions