In some languages like C, C++, and Java, we must declare the name and datatype of variable before using it. But in PHP, datatype is related with the assigned value so no datatype declaration is necessary.
Saturday, February 28, 2009
Home »
PHP Example Tutorial
,
PHP MySQL Guide
,
PHP MySQL Help
,
PHP MySQL Programming
,
PHP MySQL Tutorial
,
PHP MySQL Variable
,
PHP Variable
,
PHP Variable Declaration
,
Step by Step PHP Guide
» How to Declare PHP Variables
How to Declare PHP Variables
Kaushal Patel Saturday, February 28, 2009
In PHP, all variable names must start with the character '$'. Like other languages we do not have to declare the variables at the start of the script or program in PHP. You can declare the variable when you want to use before the statement which contain the variable.
In some languages like C, C++, and Java, we must declare the name and datatype of variable before using it. But in PHP, datatype is related with the assigned value so no datatype declaration is necessary.
In some languages like C, C++, and Java, we must declare the name and datatype of variable before using it. But in PHP, datatype is related with the assigned value so no datatype declaration is necessary.
Thanks for reading How to Declare PHP Variables
Previous
« Prev Post
« Prev Post
Next
Next Post »
Next Post »
Copyright ©
Free Online PHP Programming Tutorial. All rights reserved. Blog Templates by CB Blogger.
Nice sharing about the PHP and the tip you provide can be such a useful for the people who don't know about the variable.
ReplyDeleteshopping cart
i must say u concentrate on increasing your google PR so that millions can benefit from ur such useful blogs....thanks a lot
ReplyDeletePHP Programming