Sunday, 15 March 2015

PHP foreach statement and HTML generated links -


I have a php foreach loop which displays a list of events (organizer, event name, hour-minute, etc.). ..). One event per line such as:

  My | My Event Name | 17h45 |  

On a very similar website (but with very complexity) I found it in the source page of the exhibit:

    

So, in the creation of this event, do you think a new HTML file has occurred? How can I do this? What is good practice? Maybe I want JS?

Sorry, if my question is not very clear ...

me It does not appear that they generate a new HTML file for each event. Most likely they use just .htaccess to reuse all requests such as ".jpg-digits.html", let's say, event.php. This event.php receives the request URL or request (depending on their .htaccess instructions) and receives those digits, which are the ID of the event, and everything is received from DB.

Yes, this is generally good and helps the URL look user-friendly. You can easily make it and you can not need JS.


No comments:

Post a Comment