Looping and Conditions by PHP

Sabtu, 17 Desember 2011

We will make a loop with results like this with PHP:

1=1
1+2=3
1+2+3=6
1+2+3+4=10
1+2+3+4+5=15

The steps are:
1. Open Notepad

2. Type as shown below:





 
3. Save with any name and filetypenya *. 
PHP4. Open dibrowser, and the results are as shown below:




 For the IF Condition Program:

The steps are:
1. Open Notepad

2. Type as shown below:



 

3. Save with any name, eg input.php

4. Open Notepad again, and type as shown:



  

5. Change in the action = "hasil.php" with the name that will be used for the results of the input, then Save the file name anything what, ex: hasil.php

6. open the browser and run, ex: input.php as shown:



 

7. Input value, ie its value: 21, it will look like:


    

0 komentar:

 
© Copyright 2010-2011 materials informatics All Rights Reserved.
Template Design by Moch Ramdhan | Published by Ramdhan Templates | Powered by Blogger.com.