Created
December 20, 2013 06:58
-
-
Save itskingori/8051317 to your computer and use it in GitHub Desktop.
Simple Functions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Exercise 08: Simple function</title> | |
</head> | |
<body> | |
<?php | |
// Functions in PHP can help automate repetitive tasks and enable you to | |
// reuse code with a simple function call. For your first function, we'll | |
// keep it really simple. Create a function called "hello" that outputs that | |
// “Hello, World!” to the browser. Then call the function. | |
// Create function that echos 'Hello, World!' when called | |
function hello() { | |
echo "Hello, World!"; | |
}; | |
hello(); | |
?> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment