PHP Indexed Arrays

PHP Indexed Arrays Syntax: Syntax for indexed arrays: There are two ways to create indexed arrays: The index can be assigned automatically (index always starts at 0), like this: or the index can be assigned manually: The following example creates an indexed array named $names, assigns three elements to it, and then prints a text … Read more

PHP – Array Defined

PHP – Array Defined The array() function is used to create an array. An Array is a structure which maps one value to another. ex: we can map the integer value 1 to the string “Monday” The value 1 in this case is called a “key” The string “Monday” is called the key’s “value” An array is … Read more

PHP – Loops

PHP – Loops Loops are used to execute the same block of code again and again, as long as a certain condition is true. Types of loops: for while do-while foreach Important features of loops: continue break (you’ve already seen this used with switch) PHP -The for Loop Use this type of loop when you know how … Read more

PHP Introduction

PHP Introduction PHP code is executed on the server. What You Should Already Know Before you continue you should have a basic understanding of the following: What is PHP? What is a PHP File? What Can PHP Do? With PHP you are not limited to output HTML. You can output images, PDF files, and even … Read more