PHP Switch Statement
In the previous lessons we covered the various elements that make up an If Statement in PHP. However, there are times when an if statement is not the most efficient way to check for certain conditions. (more…)
PHP Switch Statement
In the previous lessons we covered the various elements that make up an If Statement in PHP. However, there are times when an if statement is not the most efficient way to check for certain conditions. (more…)
Require Function
Just like the previous lesson, the require function is used to include a file into your PHP code. However there is one huge difference between the two functions, though it might not seem that big of a deal. (more…)
In all programming languages, operators are used to manipulate or perform operations on variables and values. You have already seen the string concatenation operator “.” in the Echo Lesson and the assignment operator “=” in pretty much every PHP example so far.
There are many operators used in PHP, so we have separated them into the following categories to make it easier to learn them all. (more…)
PHP Include Function
Without understanding much about the details of PHP, you can save yourself a great deal of time with the use of the PHP include function. The include function takes a file name and simply inserts that file’s contents into the script that calls used the include function. (more…)
PHP If statement
The PHP if statement is very similar to other programming languages use of the if statement, but for those who are not familiar with it, picture the following:
Think about the decisions you make before you go to sleep. If you have something to do the next day, say go to work, school, or an appointment, then you will set your alarm clock to wake you up. Otherwise, you will sleep in as long as you like! (more…)