Skip to content

Instantly share code, notes, and snippets.

@itskingori
Created December 20, 2013 06:58
Show Gist options
  • Save itskingori/8051317 to your computer and use it in GitHub Desktop.
Save itskingori/8051317 to your computer and use it in GitHub Desktop.
Simple Functions
<!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