Page 1 of 1

What is Data Type in PHP?

Posted: Fri Mar 13, 2009 2:39 am
by pankajdeoria
Please Tell me
What is Data Type in PHP?
Thank You.

Pankaj Gupta

Re: What is Data Type in PHP?

Posted: Fri Mar 13, 2009 3:32 am
by requinix
It's just like a data type in another language.

What are you asking? That's not a very well-phrased question.

Re: What is Data Type in PHP?

Posted: Fri Mar 13, 2009 3:37 am
by pankajdeoria
Can you please explain me the definition of data type with examples.
Thank You.

I am very new. You can assume that I do not know anything about Datatype.

Re: What is Data Type in PHP?

Posted: Fri Mar 13, 2009 5:16 am
by Mark Baker
There's a whole section on this in the PHP manual, with lots of examples

Simple data types

Number - something numeric, that you can do sums with, e.g. 666 or 12.345 or even 12.34e-6
There are two types of numbers: integers (which don't have a decimal point like 666) or float (which do have a decimal point like 12.345)

Strings - something that is text like a word or sentence

Booleans - which can have only two possible values like True or False



If you're having trouble understanding these simple data types, then don't worry about more complex types like arrays, objects or resources until you do understand the above

Re: What is Data Type in PHP?

Posted: Fri Mar 13, 2009 6:16 am
by pankajdeoria
Thank You Mark