I am using Leaflet to add markers to map. The following ling of code is how the markers get added to my map.
markers.addLayer(new L.Marker([LAT, LONG]).bindPopup(POPUP).openPopup());
Now, LAT (float), LONG(float), and POPUP(string) are all data that are held in my database, in a companies table. So I want to loop through every row in this table and pull these three attributes from each row, add a marker and move on to the next.
I have looked up a few things, and I figured this would be a pretty good start, but I am sure how to alter this to fit my needs.
EDIT: It might be worth mentioning, that this is all done on page load and not with any click or anything of that nature.