Gurugedara Educational Channel Supportive Materials Information and Communication Technology G.C.E. (A/L) Lesson 6- PHP Before, start the practicing examples including php codes, install xampp server in your computer downloading from https://www.apachefriends.org/index.html. Example PHP codes are given below. You can copy the content of php code one by one to the Notepad editor. When you save the copied text provide php file names like PhpEx29.php. They should save in the folder of c:\xampp\htdocs. You can follow HTML supportive materials for saving .php file with notepad editor. Example 01- PhpEx29.php Example 02- PhpEx30.php <html> <body> <?php function LocalTest() { $x = 5; // local scope } LocalTest (); echo $x; // using x outside the function will generate an error ?> </body> </html> <html> <body> <?php function LocalTest () { $x = 5; // local scope echo $x; } LocalTest (); ?> </body> </html>