Module 2- Textbook Readings
I was assigned to read chapters 1-3 and practice the samples of my choice to gain more experience. Below you may find the three examples I chose to work on, one from each chapter.
To view assignment details click here.
Chapter 1. Concatenating Strings Example
Concatenation is similar to adding strings (where characters would be added to the end of string). The concatenation operator can be put to work by utilizing the period (.) key. Line 13 shows exactly how the period (.) key is being utilized to add the author's first and last name. Therefore a new variable is created ($author) of the two strings with a space in between. Line 18 where the code is commanded to print out a text is also altered into $author.
To see live website click here.
Chapter 2. Creating and Accessing Arrays
The example I chose to work on for chapter 2 is focused on drop-down menus and how to create a small application while using them. When accessing array elements you must use the foreach loop. The textbook made it very easy to understand and grasp on the following code below. The code below is my drop-down calendar.
To see live website click here.
Chapter 3.
In chapter 3 I learned about including multiple files, HTML forms, creating my own functions and making sticky forms. The purpose of the code below is to demonstrate how lines 3-5 create the annoying ad.