On my site, I have a separate file for a menu bar at the top of every page that I connect to all my pages through the PHP require function. Some of the values on this bar change while you are on the site and I would like them to refresh every certain amount of time. I used a JQuery script, (a huge script that I can't post here), to reload it every few seconds that was exactly the same as my functional clock, and I used this to access it:
/
var refreshId = setInterval(function()
{
$('#menu').load('../inc/menu.php');
}, 5000);
/
And then:
/
?>
<div align="center" id="menu">
<?
require(../inc/menu.php");
?>
</div>
<?
/
However, when I run it, a 0 appears at the top of the page. Other than that, it works fine, but why is it doing that? I've been looking for the solution online, but I can't find anything.
Also, is there any way I can make it only refresh a certain number of times instead of constantly?