Website Script Tutorial PHP Arrays

What is an array? When working with PHP, sooner or later, you might want to create many similar variables. Instead of having many similar variables, you can store the data as elements in an array. Each element in the array has its own ID so that it can be easily accessed.
There are three different kind of arrays:
- Numeric array – An array with a numeric ID key
- Associative array – An array where each ID key is associated with a value
- Multidimensional array – An array containing one or more arrays

Galifo PHP Tutorial: PHP Switch Syntax Statement

php

The Switch statement in PHP is used to perform one of several different actions based on one of several different conditions. If we want to select one of many blocks of code to be executed, use the Switch statement. The switch statement is used to avoid long blocks of if..elseif..else code.
Example Syntax of PHP Switch

The Concatenation Operator in PHP String

php

There is only one string operator in PHP, The concatenation operator (.)  is used to put two string values together. To concatenate two variables together, use the dot (.) operator:

What Strings in PHP?

php

A string variable in PHP is used to store and manipulate a piece of text. String variables are used for a value that contains character strings. In this tutorial we are going to look at some of the most common functions and operators used to manipulate strings in PHP. After we create a string we can manipulate it. A string can be used directly in a function or it can be stored in a variable.
Below, the PHP script assigns the string “Hello World” to a string variable called $txt:

Example of PHP String

Example of PHP String

Result of PHP String

Result of PHP String

Page 1 of 3123