W3schools for PHP – Full Review

W3schools has been around for a while, and it’s the center source for free PHP references and learning. W3schools is great, because it costs nothing. The only difference between W3schools and other learning resources is that it’s not videos. For people who prefer reading instructional information instead of watching videos, W3schools is a great resource for PHP and other materials.

W3schools has tons of information on PHP, classes, emailing, data types, beginner introductions and functions. You can learn just about anything for PHP from W3schools. The parts that stand out and new PHP developers should take note of are:

  • The Introduction
  • PHP variables
  • PHP arrays
  • Operators
  • Constants
  • Data types
  • If, Else, Elseif statements

The Introduction

An introduction to PHP and any other language is imperative. W3schools helps you learn the basics with its introduction course. If you are a seasoned programmer, you can probably skip this part, but it helps to know the very basics. The very basics include how to notify a web server that you are calling a PHP function, variables and the very basics of why you would want to learn PHP. PHP is one of the main languages of dynamic pages, so understanding these features helps.

PHP Variables

Variables are the very foundation for any programming language. W3schools helps you learn PHP variables, which start with the “$” symbol. This is unique to the PHP programming language, and W3schools helps you understand how to deal with PHP variables. Variables for any language are a required part of learning, but PHP is somewhat different in that the variables don’t need to be defined before using them.

W3schools is more succinct in what they tell you for variable learning. They get to the point, show you how to create a variable, assign it a string or integer, and how to do mathematical functions and assign the answer to the variable. Variables are simple to learn in PHP, and they aren’t as difficult as some other programming languages that require you to keep track of the variable’s data type.

PHP Arrays

Arrays are advanced for some programmers, but other programmers seem to pick up on arrays and how they work without knowing more advanced concepts. W3 School gives you example code and helps you understand and relate to how arrays are built and used. Arrays are variables that contain several values. The purpose of arrays is so that you can loop through the array and analyze, print, or do calculations with the array values.

W3schools shows you why you want to use an array, and then helps you create your first array. In the W3schools example, it’s a string array, but you can use an array for any number of data types. W3schools also goes through each of the array functions you can run on the array such as “count” and looping through an array to get its values.

PHP Operators

Operators are the basic operations you perform on values. Most operations are mathematical, and W3schools goes over the basic operations you need to know to program in PHP. The operators are the same as any other programming language, so unless you are new to programming, you should recognize the operators listed.

The operators you need to know are:

  • Addition
  • Subtraction
  • Multiplication
  • Division
  • Modulus

You will run into all of these operators when programming. W3schools goes through each operator and explains how to use them. These operators are basic mathematical functions, so they should be easy for even a new programmer to grasp.

Constants

Constants are another common variable syntax for programmers. If you understand other programming languages and the language constants, PHP will be easy to pick up on. Constants are variables that do not change their values. In some programs, the programmer keeps a list of constants in a separate file. Constants are good for file locations, static geographical information or anything that you want to store in the program that won’t change. The other advantage of constants is that you only need to change the value in one place instead of changing the values in several places in the program.

W3schools shows you how to make a constant, and then the website training goes through how you manage constants and the advantages.

Data Types

Data types are important for defining variables. The data type for a variable defines the type of characters or numbers you can store in that variable. W3schools helps you understand the definition of a data type, and it gives you examples for some of the important data types that most programmers will encounter.

W3schools takes you through several of the data types you need to know. Some data types are not as common, but pay close attention to strings, Booleans, arrays, objects, integers and decimals. You will most likely come across these data types when programming even the smallest website application.

Conditional Statements

The “if else” statements are conditional statements that you always find in PHP coding. Conditional statements are more difficult for new programmers, but W3schools takes you through some of the reasons for a conditional statement and how to use it. Conditional statements return a true or false return, and depending on that return statement, the code runs in that specific block of code. This can be difficult to understand, but W3schools help make it much clearer.

 

If you want to learn PHP programming, W3schools is an excellent way to learn PHP without watching videos. Some programmers prefer to learn through videos, but others prefer written examples and an explanation. If that is your style of learning, W3schools is the way to learn. Best of all it is free, so there is no cost to read and learn from W3schools. W3schools also has several other languages that you can learn, so it’s a great resource for new programmers to any language.

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *