I am trying to work out how to write php functions, so that I don't have to keep writing a block of code over and over again, I am having a play around and tried writing this, but it doesnt work for some reason, can anyone tell me where I am going wrong ?.
<?php
$greeting 'Hello';
function frank ()
{
$name = 'frank';
$2nd = 'robson';
echo $greeting;
echo $name;
echo $2nd;
}
echo frank()
?>