I have a navigational bar, an image, and a heading that I\'ll be including in every page of my website, so I wanted to use php include to refer to this code in several pages
First: what the others said. Forget the echo statement and just write your navbar.php as a regular HTML file.
Second: your include paths are probably messed up. To make sure you include files that are in the same directory as the current file, use __DIR__
:
include __DIR__.'/navbar.php'; // PHP 5.3 and later
include dirname(__FILE__).'/navbar.php'; // PHP 5.2