PHP (PHP: Hypertext Preprocessor) is a scripting language used primarily in server-side solutions for creating dynamic web pages.
To write the code we can use Notepad++
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | <!DOCTYPE html> <html> <head> <title>PHP tervitus</title> </head> <body> <h1>PHP tervitus</h1> <!--php koodi osa--> <?php echo "Tere hommikust!" ; $tekst = "TARpv22" ; echo "<br>" ; echo $tekst ; //matemaatika tehed $arv1 = 10; $arv2 = 12; echo "<br>" ; echo "Liitmine: " .( $arv1 + $arv2 ); echo "<br>" ; echo "Lahutamine: " .( $arv1 - $arv2 ); echo "<br>" ; echo "Korrutamine: " .( $arv1 * $arv2 ); echo "<br>" ; echo "Jagamine: " .( $arv1 / $arv2 ); echo "<br>" ; echo "Arv1 ruudus: " .pow( $arv1 , 2); echo "<br>" ; ?> </body> </html> |


http://localhost/ your folder name
