Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Replace Echo to Return
I think, will be better, if each function RETURN variable in main code, but do not ECHO.
Because you will operate with return value in main code.

Simple ex: I have removed link in header to main page, when page is main, for it I have replace Echo to Return in functions get_site_name() and get_site_url()

function get_site_url() {
    global $SITEURL;
    return $SITEURL;
function get_site_name() {
    global $SITENAME;
    return stripslashes($SITENAME);
} ?>
if ($url == 'index')
    echo get_site_name();
    echo '<a href="'.get_site_url().'">'.get_site_name().'</a>';

Users browsing this thread: 1 Guest(s)