Sunday, June 30, 2013

Type Juggling and Type Casting



Type Juggling:
PHP does not require (or support) explicit type definition in variable declaration; a variable's type is determined by the context in which the variable is used. That is to say, if a string value is assigned to variable $var, $var becomes a string. If an integer value is then assigned to $var, it becomes an integer.

PHP data types



In PHP we have 8 primitive data types. They are categorized into 3 basic categories – scalar, compound, and special. It’s also important to note that PHP is a dynamically typed language.

Variable types and Variable Scope




The scope of a variable in PHP is the context in which the variable was created, and in which it can be accessed. Essentially, PHP has 2 scopes:

Sunday, June 9, 2013

Uploading XML file into PHP

If you want to upload XML file into PHP, this tutorial will teach you first to make XML file and then mechanism to upload into your database using PHP.
To Download full files, Click Here 

First start with creating XML documents

Sunday, June 2, 2013

Variable and Variable Scope

Variables:
Variables are used for storing a values, like text strings, numbers or arrays. When a variable is declared, it can be used over and over again in your script. All variables in PHP start with a ‘$’sign symbol.

Basic PHP Constructs


A construct is just short for control structure. Unlike an expression the construct creates a flow of control in the code. The construct controls how or when statements are executed, in order to create a structure of code that effectively tackles the task the programmer aims to achieve. Think of constructs like a place where code gets directed (or literally constructed) during execution. Imagine a busy intersection where lots of cars need to pass through. A construct is like a traffic light that directs how the traffic flows so that there isn’t an accident.