Magic Constants

Magic Constants

Magic Constants Magic constants are predefined constants in PHP that change based on their usage. They begin with a double underscore (__) and end with a double underscore. They are similar to other predefined constants but as they change their values ​​with reference, they are called magic constants. PHP has nine magic constants. In which …

Continue Reading…… Magic Constants

PHP Constants

PHP Constants

PHP Constants PHP constants are names or identifiers that cannot be changed during execution of a script other than magic constants, which are not actually constants. There are two ways to define PHP constants: Using define() function Using const keyword Constants are the same as like variable except once defined, they can never be undefined …

Continue Reading…… PHP Constants

PHP Variables

PHP Variables

Types of PHP Variables In PHP, variables can be declare using a $ sign follow by the variable name. Here, some important points are given to know about variables: As PHP is a loosely typed language, so we don’t need to declare the data types of the variables. It automatically analyzes the values ​​and performs …

Continue Reading…… PHP Variables

PHP Print

PHP Print

Another way to print in Php In the previous chapter, we have learnt about Echo used to print output. PHP also have a second statement, which is use to get the output. This is PHP print statement. PHP print statement Just similar to echo, print is also a language construct, so it don’t need to …

Continue Reading…… PHP Print

Php Echo

Php Echo

Php Echo It is a way to get output in php. In PHP, we can get output in two ways :- (i) echo (ii) printIn this article, we will discuss how to get output using Echo. What is PHP Echo? PHP echo is a statement which is use to display the output. It can be …

Continue Reading…… Php Echo