Page 1 of 1
basical string
Posted: Tue Dec 19, 2006 1:40 pm
by hrubos
Would I ask a basical question ?
When I set a parametr, I have type $id_number --> is it good ? or without "_ " in string
Posted: Tue Dec 19, 2006 1:45 pm
by GeertDD
Variables names in php are allowed to contain underscores. I guess it is a matter of personal preference. I tend to use underscores as well.
To give you an idea, the combinations below are all possible.
Code: Select all
$id_number = 1;
$idnumber = 1;
$idNumber = 1;
Posted: Tue Dec 19, 2006 1:48 pm
by hrubos
GeertDD wrote:Variables names in php are allowed to contain underscores. I guess it is a matter of personal preference. I tend to use underscores as well.
To give you an idea, the combinations below are all possible.
Code: Select all
$id_number = 1;
$idnumber = 1;
$idNumber = 1;
aha, so $id_number is possible.
But infuture I will use $idNumber, it's better
thanks much
Posted: Tue Dec 19, 2006 2:01 pm
by GeertDD
That's called camelBack style -- for obvious reasons.
http://www.fresnochaffeezoo.com/images/camel.gif
feyd | 75K gif..............
Posted: Tue Dec 19, 2006 2:27 pm
by RobertGonzalez
hrubos wrote:aha, so $id_number is possible.
Did you try this first? Trying this would have easily told you that it would work.
Posted: Tue Dec 19, 2006 2:28 pm
by Kieran Huggins
Everah wrote:hrubos wrote:aha, so $id_number is possible.
Did you try this first? Trying this would have easily told you that it would work.
hehe - you should mention that in your signature or something... people just don't seem to get it!
