In this PHP tutorial, we learn how to work with variables. We walk through preforming some simple calculations and outputting the data to the web browser.
In many languages, the type of case we use matters. For example: eCho and echo, could mean two different things. In PHP, commands are not case-sensitive. This makes coding easy, but I personally like to standardize on using all lower case, when working on projects.
On the other hand, variable names, are case sensitive. If you define a variable named num and call it Num, you are going to get a syntax error. In the two videos below, we explore case sensitivity in PHP.
As we continue our PHP series, we learn that we live and die by good or bad documentation. The practice of using comments in any project you do is crucial. Good comments are just as important as the program functioning correctly.
In this video tutorial, we will get our feet wet and program our first PHP script. It is not flashy, but it is a start to learning how PHP works. We also learn how to do a single line comment in this tutorial. The command we will learn is called echo. Echo displays PHP variable data in HTML format to the end user. This forms a statement and we learn that statements, must be closed with a semicolon.
We have started a great series on how to program in PHP. PHP (recursive acronym for PHP: Hypertext Preprocessor) is a widely-used open source general-purpose scripting language that is especially suited for web development and can be embedded into HTML.
In the last several tutorials we covered a lot of information quickly. In this tutorial we will recap a variety of the components that we have learned so far.
We will create a program that will input and output a string variable. We will use an if statement to determine what data to output to the user. This is a neat tutorial to quickly recap the information that we have learned so far.