Saturday, February 28, 2009

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.


logoblog

Thanks for reading How to Declare PHP Variables

Previous
« Prev Post

2 comments:

  1. 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.
    shopping cart

    ReplyDelete
  2. i must say u concentrate on increasing your google PR so that millions can benefit from ur such useful blogs....thanks a lot
    PHP Programming

    ReplyDelete