Doubtz Q&A
Login
Register
How to define data type in PHP?
asked
Dec 2, 2012
by
Arshita Rihani
Please
log in
or
register
to answer this question.
1 Answer
+1
vote
There is no need to define data type of variable.
PHP provides a facility which allows to program to perform operations in the way of how variables assigned.
If you wrote
$a=5; // it will acts as int
if you wrote
$a='5'; // it will acts as string
answered
Dec 2, 2012
by
Sandeep Kane
So it means it defines variable type automatically in context?
Yes. There is no need any data type to any variable.
You can assign any type of value afterwards you have declared. (still no need to declare a variable you can directly use any variable w/o declaration).
Please
log in
or
register
to add a comment.
Related questions
1
answer
How Can We Encrypt The Username By Using PHP?
asked
Sep 22, 2012
by
kristinakathy
1
answer
What is the type of poem in which the first letter of each line is taken to form a name or sentence ?
asked
Mar 30, 2012
by
anonymous
acrostic
poem type
0
answers
What are the best type of hitches to use for my trailer?
asked
Jan 11, 2013
by
anonymous
0
answers
what type of climate is required to grow mint ?
asked
Sep 3, 2012
by
anonymous
1
answer
What framework should i consider in php development?
asked
Jun 25, 2012
by
anonymous
...