PHP while loop The while is a control flow statement that allows code to be executed repeatedly based on a given boolean condition. This is the general form of the while loop: while (expression): statement The while loop executes the statement when the expression is evaluated to true. The statement is a simple statement terminated byContinue Reading

Code execution can be grouped into categories as shown below Sequential – this one involves executing all the codes in the order in which they have been written. Decision – this one involves making a choice given a number of options. The code executed depends on the value of the condition. AContinue Reading

Operator in PHP is a symbol that is used to perform operations.For example: +, -, *, / etc. There are many types of operators in PHP which are given below: Arithmetic operators Assignment operators Comparison operators Increment/Decrement operators Logical operators String operators Array operators Arithmetic operators Operator Description Example Result + AdditionContinue Reading

Strings are very important data types in computer languages. That is why we dedicate a whole chapter to working with strings in PHP. PHP string literal A string literal is the notation for representing a string value within the text of a computer program. In PHP, strings can be created with singleContinue Reading

List of PHP data types PHP has eight data types: Scalar Types boolean integer float string Compound Types array object Special Types resources NULL Unlike in languages like Java, C, or Visual Basic, in PHP we do not provide an explicit type definition for a variable. A variable’s type isContinue Reading

If there is an input then it must have an output. So in PHP also there is two statements which are used for displaying output data to the screen echo print Both the statement are used for displaying data on the screen. Difference between ‘echo’ and ‘print’ echo print ThisContinue Reading

All the PHP code is surrounded by two delimiters, <?php and ?>. <?php # PHP code ?> PHP code is put between two delimiters. PHP console output Output from our PHP scripts is sent to the console. Note that we say console because here we use the PHP_CLI command line interpreter. If we test theseContinue Reading

Computer languages, like human languages, have a lexical structure. A source code of a PHP script consists of tokens. Tokens are atomic code elements. In PHP language, we have comments, variables, literals, operators, delimiters, and keywords. PHP comments Comments are used by humans to clarify the source code. All comments inContinue Reading

What is XAMPP? XAMPP is an open source cross platform web server, MySQL database engine, and PHP and Perl package. It is compiled and maintained by apache. The acronym XAMPP stands for; X – [cross platform operating systems] meaning it can run on any OS  Mac OX , Windows , Linux etc. A – Apache –Continue Reading