Welcome to the PHP world. You have successfully entered into a very beautiful place. really it is true !!!! you are a very lucky man !!!
First we will take some coffee and we will discuss about our php !!! 🙂
PHP is a scripting language, originally designed for creating … Read more
PHP variable’s name begins with a $ sign, followed by a name- and that name must start with a letter or an underscore, not a number.PHP can also store all types of data in variables which makes things a lot easier. (Don’t have to create different types to store data, … Read more
A comment is using to note a short description about the working flow of the program or hide some unwanted code for special purposes . Commented code couldn’t execute or do anything in the part of the program.
we can use // for a single-line comment or /* and */ … Read more
In PHP, Mathematical operators preform simple math calculations. The five mathematical operators are multiplication (*), division (/), subtraction (-),Modulus (%) and addition (+).
Sum of two Numbers using PHP
$a = 8;
$b = 4;
Output : 12
… Read more
PHP have some inbuilt mathematical functions for calculations. They are
# abs() — This function returns the absolute value of a number
# acos() — Using for to find arccosine of a number
# acosh() — helps to Inverse hyperbolic cosine
# asin() — Using for to get Arc sine… Read more
In PHP, basic assignment operator is equal to(“=”). Some other operators are +=, -=, *=, /=, .= and %= .
The value of $b is assigned to a variable $b.
It is the same calculation of $a=$a+$b.
It is the same calculation of $a=$a-$b.
In PHP, Comparison operators helps to compare two values. basic comparison operators are Equal(==),Identical(===),Not equal(!= or <>), Not identical(!==), Less than(), Less than or equal to(=)
$a == $b
if $a is equal to $b then return TRUE.
$a != $b
if $a is not equal to $b then return
… Read more
In PHP have an alternative syntax for if, while, for, foreach, and switch. The basic form of the alternate syntax is to change the opening brace to a colon (:) and the closing brace to endif;, endwhile;, endfor;, endforeach;, or endswitch;, respectively.
for (initial; condition; increment) :… Read more
In PHP, Logical operators perform conditional and, or, and not operations. This also called Bitwise operators. Some Bitwise operators as follows
$a && $b
Value required for $a and $b.
$a || $b
Value required for $a or $b.
$a xor $b
Value required for $a or $b (not both
… Read more
PHP have some inbuilt powerful string handling and manipulating functions. PHP string function are
To add backslashes , in front of the specified characters
To add backslashes , in front of the predefined characters
Convert binary data into hexadecimal representation