make money free online
star business online
8:52 PM

Variables and Data Types

Posted by Business

Data types form the backbone of any programming language, providing the
programmer with a means by which to represent various types of information. PHP
provides support for six general data types:

· Integers

example : 4, 456, 468

· Floating-point numbers

example :12.45, 5.9736e24

· Strings

example : dino, abc, &%/$£

· Arrays

example : $meat[0] = "chicken";

· Objects

example : $blender = new appliance;

· Booleans

example : $flag = TRUE;

Variable Declaration

A variable is a named memory location that contains data that may be manipulated
throughout the execution of the program.
A variable always begins with a dollar sign, $. The following are all valid variables:

$color
$operating_system
$_some_variable
$model

$sentence = "This is a sentence."; // $sentence evaluates to string.
$price = 42.99; // $price evaluates to a floating-point
$weight = 185; // $weight evaluates to an integer.

next article explain about variable very deep. we learn slowly but definite.

0 comments:

Post a Comment