3/20/15

PHP Syntax




PHP Environment Start – End

syntax is a way to representation of PHP script.
Basically it gives the primary idea to specify the code format.
It also specify the area of a written code.
There are three ways to start PHP environment.

The most commonly and effective  PHP  syntax:

<?php
 echo "welcome to the world of php"; 
 ?>
In the given Example
It begin with (< ?php) and End with(? >).
echo statement is used to print the given string. Mandatory closing in(“ABCD”)double quotes.
Terminate the script with semicolon because semicolon is known as terminator.

Short or short-open tags look like this:

 <? 
 echo "welcome to the world of php";
 ?>
In the given above example..
We use Short tags. start and end with () respectively.
Declare the statement in between (), to display the output on browser
short open tags smoothly works on XAMPP server but Face problem on wamp server
if you are using  WAMP Server First you have to Set the short_open_tag setting in your php.ini file to on
HTML script tags:
<script language="PHP">
        echo "welcome to the world of php";
</script>
HTML script is also declare to start PHP environment.

Related Posts:

  • PHP CAPTCHA A CAPTCHA is a type of challenge-response test used in computing as an attempt to ensure that the response is generated by a human bei… Read More
  • PHP Numeric Don’t think that PHP’s power is limited to strings only. The language has over 50 built-in functions for working with numbers, ranging from si… Read More
  • PHP string functions PHP has over 75 built-in String manipulation functions, supporting operations ranging from string repetition and reversal to comparison and sear… Read More
  • PHP Array All the variables you have used have held only a single value. Array variables are “special” because they can hold more than on… Read More
  • PHP Conditional Statement PHP lets programmers evaluate different conditions during of a program and take decisions based on whether these conditions evaluate to tru… Read More

0 comments:

Post a Comment

FIND US ON FACEBOOK

FIND US ON Twitter