mercredi 1 mars 2017

What's a good way to generate and print a whole div only once in PHP?

I have a complex menu where i have to generate three new menus for every menu item in the first column of the menu (something like amazon has), and the part where I generate the menu is rather simple, but because I'm dealing with a lot of data when I generate the menu, it's very slow to do it, and that menu appears on every page so it has a huge impact on the page load.

What I want to do is generate that div only once and then only print it, rather than generate it upon every refresh of the page. What is the best way to approach this?




Aucun commentaire:

Enregistrer un commentaire