Obtain a php var in another page in the current page : I would create an ajax code that load a php page every x seconds and it obtain a specific php var in the loaded page and assign the value of the obtained var to a javascript var, sorry for my bad english.