Skip to content

Instantly share code, notes, and snippets.

@ksnider
Created January 21, 2014 20:36
Show Gist options
  • Select an option

  • Save ksnider/8547859 to your computer and use it in GitHub Desktop.

Select an option

Save ksnider/8547859 to your computer and use it in GitHub Desktop.
<?php
function writeMsg()
{
echo "Hello world! <br/>";
}
writeMsg(); // call the function
function familyName($fname)
{
echo "$fname Dawg.<br>";
}
familyName("Major");
familyName("Lexi");
familyName("Dritte");
familyName("Ohne");
familyName("Rose");
familyName("Nessa");
echo '<br/>';
function sum($x,$y)
{
$z = $x + $y;
return $z;
}
echo "5 + 10 = " . sum(5,10) . "<br>";
echo "7 + 13 = " . sum(7,13) . "<br>";
echo "2 + 4 = " . sum(2,4);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment