Previous | Home | Next |
<html> <head> <title>Defining functions before or after calling them</title> </head> <body> <? function page_header() { print '<html><head><title>Welcome to my site</title></head>'; print '<body bgcolor="#ffffff">'; } page_header(); print "Welcome, $user"; page_footer(); function page_footer() { print '<hr>Thanks for visiting.'; print '</body></html>'; } ?> </body> </html>
Output:
Previous | Home | Next |