April 17, 2012
PHP – Footer function sample
Question by NewLearner
I’ve been looking all over but I cannot find an example. I want to write a foother function into my functions.php Can you please give me a simple sample of how this is done. I think I have an idea but I’m not sure if will work.
function footer_function()
{
$return_Str='';
$return_Str .= '<h3>Copyright © 2012</h>';
return $return_Str;
}
Thank you all for your help!!!
Answer by Starx
This is probably what you wanted.
function footer() {
$return_str = "";
$return_str .= '<h3>Copyright 2012</h3>';
return $return_str;
}
To display the footer. Just do this
echo footer();