PHP (Personal Home Page) - Day 4

Hello friends in my previous blogs

PHP (Personal Home Page) - Day 1
PHP (Personal Home Page) - Day 2
PHP (Personal Home Page) - Day 3

I already describe you about the basic concept of PHP and about its syntax, tags and its variables. Now I describe the some more programming approaches in PHP.

Data type - in php there are 6 basic and 2 special data types are present.

  1. Integer
  2. Float/double
  3. String
  4. Array
  5. Boolean
  6. Object
  7. Null
  8. Resource

How to identify the data type used in a program



Output



gettype() - it is used to identify data type of the variable.

String- any thing define within the single codes (‘ ’) and double codes (“ ”) is called string. By default string hold null value.



Output


Some string functions are

  • Strlen();
  • Strpos();
  • Strtoupper();
  • Strtolower();
  • Strrev();
  • Substr();
  • Crypt();
  • Ucfirst();
  • Ucwords();
  • Is_string();

Phpinfo(); Tag 


Output



This tag produce all the information about your system, server, configuration, environment etc.
Next Recommended Reading Create Master Page Template In PHP