I don't know what is the best pratice but I have the index.html where I do:
<script src="getGames.php"></script>
<script src="../js/filters.js"></script>
In that php file I fetch the data from the db, I'd like to use that data in the .js file, how can I do it? what is the best pratice in this situation?