Posts

PHP Operators

Image
3:Logical Operators We Will Discuss following logical operators that are link by PHP language Assume variable One holds 5 and variable Two holds 10 then... Some of the following Examples of Logical Operators are here.... " And " (it's Called Logical AND operator. If both the operands are true then condition becomes true.)                                     (A and B) is true. " Or " (it's Called Logical OR Operator. If any of the two operands are non-zero then condition becomes true.)                      (A or B) is true. " && " (it's Called Logical AND operator. If both the operands are non-zero then condition becomes true.)                                       (A && B) is true. " || " (it's Called Logical OR Operator. If any of the two operands are non-zero then condition becomes true.)                                        (A || B) is true. " ! " (it's Called Lo

Operator Types - PHP

Image
Operator: The Operator is a expression like as we can say 5+7 equal to 12. So Here we will say 5 and 7 operands and + is a operator. Advance PHP Language follow different types of Operators. These are following... Comparison Operators Arithmetic Operators Logical (Relational) Operators Assignment Operators Conditional (Ternary) Operators Here we will discuss all in detail one by one. Comparison Operators We discuss some of comparison operators follow by PHP language Assume variable One holds 5 and variable Two holds 8 then...... Examples of Comparison operators are..... Operator Description  Example " == "    (it will Checks when the value of two operands equal or not equal, if yes then condition becomes true.)                           (A == B) is not true . " != "    (it will Checks when the value of two operands equal or not equal, if the values not equal, that's condition becomes true.)   (A != B) is t

Constant Types-PHP

Image
Constant A Constant is an identifier (call) for a Easy value. As the name indicates, that cost Cannot Exchange for the Duration of the Execution of the script (besides for Magic constants, which are not simply constants). A consistent is case-sensitive with the aid of default. With the aid of conference, Constant identifiers are continually Uppercase.  A constant call begins with a letter or underscore, observed via any range of letters, numbers, or underscores. When you have described a Constant, it could in no way be modified or undefined. To outline a constant you need to use outline() function and to retrieve the cost of a regular, you need to really specifying its name. Unlike with variables, you do no longer want to have a Constant with a $. You may additionally use the feature Consistent() to examine a Constant's cost if you want to Achieve the Constant's name dynamically. Constant () function: As indicated by means of the call, this characteristic will retu

Variable Types For PHP

Image
Variable Types The primary Manner to Keep Information within the Middle of a PHP Program is by using the use of a Variable. Here are the maximum vital matters to recognise about variables in PHP(Hypertext Preprocessor). All Variables in PHP(Hypertext Preprocessor) are Denoted with a leading Dollar sign ($). The Value of a Variable is the Cost of its most Current Task. Variables are assigned with the = operator, with the variable at the left-hand facet and the expression to be evaluated on the right. Variables can, but do now not need, to be Declared earlier than Assignment. Variables in Hypertext Preprocessor(PHP) do no longer have intrinsic Sorts - a Variable does now not know earlier whether it'll be used to save more than a few or a String of Characters. Variables used earlier than they're Assigned have Default values. Hypertext PreProcessor(PHP) does a great job of automatically converting types from one to some other while important or Necessary. Hypertext

PHP Embedding

Embedding PHP in Different Web Pages Although it is Possible to Write down and run Standalone Hypertext Preprocessor (PHP) applications, Most Hypertext Preprocessor(PHP) code is Embedded in HTML or XML files. This is, in spite of Everything, why it Became created within the First Place. Processing such Files Entails Changing each Chunk of Hypertext Preprocessor(PHP) Source code with the Output It Produces whilst Finished. Because a Single or Separate file Includes PHP and non-Hypertext Preprocessor (PHP) supply code, we want a way to Discover the Regions of PHP code to be carried out. PHP affords 4 exceptional methods to try this. As you may see, the Primary, and Desired, Approach looks as if XML. The Second Technique looks like SGML. The Third Method is look like Based totally on ASP tags. The fourth Approach makes use of the usual HTML <script> tag; this makes it clean to edit pages with enabled PHP using a Regular HTML editor. 1. Short-open (SGML-style) tags Qu

PHP STEPS

Image
Basic PHP Steps :  The code itself suits proper internal a page’s HTML, and prefer HTML it's far made up of Undeniable(Plain) ol’ Textual Content. So a web page that presentations the phrases or words “i am a Angry MAM!” message would take a seat interior or insde an HTML page Named Something. Hypertext PreProcessor(PHP) , like this: <html>  <head>       <title> Angry Man Example        </title>  </head>  <body>  <font color = "blue">My PHP code makes this page say:</font> <p>  <?php print ("I am the Angry MAN"); ?>                            </p>  </body>  </html> Now you try and See how that works? The HTML is rendered as regular HTML, but everything that is inside the  "?php" and "?" tags gets processed as PHP. Basic Syntax Of PHP Now Its time to write or create your own first PHP script. The

What Can PHP Do

Image
What Can PHP Do? PHP is in particular targeted on Server-Aspect Scripting , so that You can do Some thing any other CGI application can do, inclusive of gather shape statistics, generate dynamic web page content, or send and get hold of cookies. However Hypertext Preprocessor can do lots more. There are THREE Foremost Areas wherein PHP scripts are used. Command Line Scripting.  You could make a Hypertext Preprocessor script to Run it with none Server or Browser. You only need the Hypertext Preprocessor(PHP) parser to Apply it this way. This type of Usage is Good for Scripts Regularly done the usage of Cron (on *Nix or Linux) or project Scheduler (on Our windows). Those Scripts also can be used for Easy Textual Content Processing Responsibilities. See the phase about Command line usage of Hypertext Preprocessor for more statistics. Server-Aspect Scripting. That is the most Conventional and Major target field for Hypertext Preprocessor(PHP). You want three things