Monday, 20 May 2013

data type in php


PHP Data Structures

    Data Type -

       PHP supports eight types of data structures. Half of these are scalar types, meaning they hold only a single value. These are: Booleans (True/False), integers, floating-point numbers, and strings (any quoted character or sequence of characters).

    PHP supports two non-scalar types:

  • arrays
  • objects


  • Array
  • Arrays are very commonly used, in everything from handling HTML forms to retrieving database query results.
  • Objects
  • Objects are used when performing object-oriented programming.
  • Finally, PHP supports two special types: resources and NULL-

  • Resourses
  • NULL


  • Resourse
  • Resource types provide a pointer-like reference to database connections, opened files and directories, dynamically-generated images, etc.
  • Null
  • The NULL type is represented by:
    the constant NULL 
    -a variable not assigned a value
    -a variable that has been unset

No comments:

Post a Comment