PHP: Case Sensitivity in Functions & Variables

PHP: Case Sensitivity in Functions & Variables

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.

(more…)

Comments in PHP

Comments 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.

(more…)

Basics of PHP: Starting a Script and Using Echo

Basics of PHP: Starting a Script and Using Echo

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.

(more…)

PHP: Getting Started with Variables

PHP: Getting Started with Variables

The video below shows you how to use variables in PHP.  A few important things to remember:

  1. PHP variables are case sensitive
  2. Variables start with $, followed by the name
  3. Variables must start with an underscore or letter
  4. Variables CANNOT start with a number
  5. Variables can only be alpha-numeric characters with the exception of underscores

Project Files: output-variables

Pin It on Pinterest