home

Php Data Types Tutorial


PHP data types are divided into two broad categories.

Type Casting in PHP

PHP automatically converts data types. But, this type casting can also be enforced by using type conversion operators. Type conversion operators are simply the name of data type enclosed in normal brackets and placed before the expression.

(data type) expression;

for example

<?php
$mytype = (int) 54.99;
echo $mytype;
//will conver 54.99 to integer and will show 54
?>


Content on this page requires a newer version of Adobe Flash Player.

Get Adobe Flash player

all rights reseverd by Cramerz.com©. web design london by dotPeak. hosting by HostBay
all contents on cramerz are the property of Cramerz.com