Tag Archives: PHP

PHP – Get and Post

PHP – Get and Post PHP allows you to create an environment variable that can be set by phpinfo.php page. HTTP_USER_AGENT is an environment variable provided by PHP that identifies the browser and the operating system. HTTP_USER_AGENT variable creates dynamic content based on the contained information. The value of these environment variables can be accessed via getenv() function.… Read More »

PHP – Functions

PHP – Functions Functions can be defined as the block of the code or some set of instructions that executes by the PHP. these functions may or may not take parameters to pass to that code block. There are two types of functions that are supported by PHP. 1. Built-in functions As we all know that PHP has… Read More »

PHP – Strings

PHP – Strings Strings are considered as a sequence of characters. You can use the strings within single or double quotes, without quotes you will not be able to perform string operations. Even if you want an integer to represent as string you can enclose that integer within quotes, it will be typecast as a string. Both single… Read More »

PHP – Arrays

PHP – Arrays Arrays are a type of data structure that allows you to store a number of elements having the same data type using a variable. By using an array the use of multiple variables for each value can be avoided. Arrays are easy to use and parse using an index value. You can easily handle when… Read More »

PHP – Loops

PHP – Loops Earlier we learned about conditional statements where we run some set of instructions for a particular satisfying condition but the set of code will be run only once. In case we want to loop the execution of the set of codes whenever a condition is true then we use loops. This loop will run until… Read More »

PHP – Operators

PHP – Operators Operators are used for performing various functions or operations on variables and values. PHP supports a number of operator types to get the desired output. Some of the operators are defined below- Arithmetic operators Logical operator Conditional operator Assignment operator Comparison operator 1. Arithmetic operators Arithmetic operators perform arithmetic operations on variables and on the… Read More »

PHP – Constants

PHP – Constants A constant is an identifier whose value keeps constant or does not change during the execution of your program. Unlike variables, these constants are mostly uppercase. It can be a combination of letters, numbers, and underscore but should always be started with a letter or underscore. Define function is used to create a constant, which… Read More »

PHP – Syntax

PHP – Syntax PHP is a programming language with many features that can easily be embedded in HTML. You can add the PHP code anywhere in the document either within the PHP tags or within the HTML. As you have now done with the configuration part, we can easily start with the concepts. Before we step ahead, we… Read More »