Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
php-functions-2/index.php
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
48 lines (44 sloc)
956 Bytes
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>String Functions</title> | |
</head> | |
<body> | |
<?php | |
error_reporting(E_ALL); | |
ini_set('display_errors', 1); | |
?> | |
<p> | |
<?php | |
$namelength =strlen('brandon'); | |
echo $namelength; | |
?> | |
</p> | |
<p> | |
<?php | |
// Here we define the function... | |
function helloWorld() { | |
echo "Hello world!"; | |
} | |
// ...and here we call it! | |
helloWorld(); | |
?> | |
</p> | |
<p> | |
<?php | |
function greetings($name) { | |
echo ("Greetings, " . $name . "!"); | |
} | |
greetings('brandon'); | |
?> | |
</p> | |
<p> | |
<?php | |
function aboutMe($name, $age) { | |
echo "Hello! My name is $name, and I am $age years old."; | |
} | |
aboutMe('Brandon' , 25); | |
?> | |
</p> | |
</body> | |
</html> |