JaiswalTraining

Get the online training



Corejava Servlet Jsp  Php  Hibernate  Ajax Web Service   Ejb2.1 Ejb3.0 Struts Struts2  JPA Spring Ibatis   JSF    JSF2.0  CoreJavaDesignPattern    Jquery  Flex J2EE-Design-Patterns  Jboss7  Maven  Contact Me                                                                                                                                                                        
            IGNOU SMU PTU Project                                           Training                                                                                                                              
              

Contact Us  0091- 9210721663         jaiswaltraining@gmail.com




Corejava
Servlet
Jsp
Php
Hibernate
Ajax
Web Service
Ejb2.1
Ejb3.0
Struts  
Struts2
JPA
Spring
Ibatis
JSF
JSF2.0
CoreJavaDesignPattern
Jquery
Flex
J2EE-Design-Patterns
Jboss7
Maven









PHP Fundamental


This chapter demnstrates the use of the variable, variable definition, different operator types, constants definition,use.

Following are the topics to be covered.

  • What is the variable.How to use it.
  • Different  data types .
  • Different types of  operators and its use.
  • How to use operators to create expressions.
  • How to define and use constants.


    What is variable

    Variable is the entity whose values vary.Variable word  has come from mathematics.
    Variable can be of any data type i.e integer,character , boolean, String etc.

    Different data types are

  • Float
  • Integer
  • Character
  • Double
  • String
  • Boolean


    • Float and double are decimal numeric data types.
    • Integer has no decimal value.It has only integer value.
    • Character has single character.
    • String is collection of character.
    • Boolean has true and false value.                                                                






    Scalar Variables

    Like perl  php has no specific data  types variables.
    But all variables are  scalar variable.
    Scalar variable accept all data types values and behave like that.

    It has prefix $ then variable name.

    for example

    $x=90;

    $name="john";

    • echo  and print function is used to display the variable values.
    • Whenever echo and print gets the $ sign then it prints the contents.
    • echo and print also doees the various operations using the various operators.

    Example

  • <?php

    echo "my first program in php";

    ?>






              Previous                                                             Home                                                                       Next