Page 1 of 1

Difference Between varibales

Posted: Wed Nov 24, 2010 10:31 pm
by dheeraja
Hi Guys,

I found in a page that variables are declared in two ways:
$_start = 1;
$result = 2;

Is there is any difference between both variable declaration, why underscore ( _ ) has used in first variable.

Thank you.

Re: Difference Between varibales

Posted: Wed Nov 24, 2010 10:34 pm
by Jonah Bron
No, there's nothing special about an underscore in a variable name. Here's the manual on the basics of variables:

http://php.net/variables.basics

Re: Difference Between varibales

Posted: Thu Nov 25, 2010 12:12 am
by McInfo
By convention, an underscore often implies that a variable is for private use.