All words in our glossary will also need to be saved somewhere, so we will opt for a MySQL database. The choice of the database is completely arbitrary. We could very well have used a different information system such as a text file or XML. The database has the main advantage of being more convenient to handle.
We can choose some projects
Dynamic replacements of acronyms and abbreviations
The application that we are going to develop must allow transforming an acronym into a specific HTML element in which its definition will be found so easily. The first makes it possible to apply a meaning on an acronym the second on an abbreviation and the last to affix a definition on a word or a set of words. The difference between acronym and abbreviation is minimal, so they are often confused. In fact, what separates an acronym from an abbreviation is the way that the acronym is pronounced. If the acronym can be pronounced naturally as an ordinary word, then we will speak rather of acronym. However, if the pronunciation of the acronym requires spelling each letter individually, then we speak of abbreviation.
The overall algorithm of this php programmer is very simple. It is broken down into four parts, as follows.
Connection to the database, Instantiation of an object of type Glossary, Retrieving Glossary words from the database and saving to the Glossary object and the last is transforming words into the HTML string.
The rotation of advertising banners with random display
A banner is displayed after being drawn at random randomly from the others registered. The principle is extremely simple. In order to make the understanding and the easy reading of this tutorial, we will follow the method presented by the following plan.
Data structures needed, Determination of the key drawn, Display of the selected banner, The final script and the Conclusion.
The goal of the php Start exercises is to teach you how to master the basics. And each requirement will be solved in a better way.