as the “back end” or “server” side of websites. Servers use these languages to serve HTML documents that browsers request. Building HTML on the server allows for content to be populated dynamically and removes the need to maintain a separate .html file for every page.
your website and all of them are built out as separate .html files. Now imagine that you need to change the footer on every page. If the pages were constructed dynamically on the server you could change the .php file containing your site’s footer once and be done with it.
Ruby, Python, Node.js, Perl There are a lot of options out there and each has its pros and cons. But, PHP is one of the most commonly used server-side languages and almost any web hosting company will come with PHP installed.
setup can vary greatly depending on your operating system and what kind of server configuration you’d like. We won’t go over setting it up in this workshop, but you can find numerous tutorials on the web that should get you set up.
used with PHP. A database lets you store and retrieve data for use in your website. Pretty much any site you use has some sort of database component. We don’t have time to get into it today, but you’ll want to make sure you learn the basics.
website 2. Server routes request to appropriate .php file 3. .php file connects to database to get content 4. PHP scripts format content into HTML document 5. Browser loads HTML document 6. Browser downloads CSS and JavaScript files 7. User interacts with page
the collection is assigned a numerical index. These indexes always start at 0. You can think of them like a list of items. To access a single item in the array you use the variable name of the array and the index of the item you want to access.
There are far too many useful PHP methods for us to explore even a fraction of them, so we’ll only work with a few of them. You can find information about every PHP method at http:// php.net/