Jump to content

Variable Names


nyi8083

Recommended Posts

[quote author=redarrow link=topic=102653.msg407725#msg407725 date=1154481041]
the ansaw is no.

but the varable names should reflect what your creating.

example varables with meanfull meaning.

$name is varable for name.
$fname is varable for first name.
[/quote]

That's handy good advice, thanks redarrow, I am learning so I find these tips very handy. :)
Link to comment
https://forums.phpfreaks.com/topic/16274-variable-names/#findComment-67496
Share on other sites

Keep in mind variables should either start of with an underscore (_) or a letter, after that they can contain any number of underscores/letters/numbers etc.

[b]Invalid vars:[/b]
$ name
$1234
$-somename

[b]Valid vars:[/b]
$__1name2__
$_name1
$name1234
$name

Redarrows advice is very good, you should name your variables accordingly.
Link to comment
https://forums.phpfreaks.com/topic/16274-variable-names/#findComment-67735
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.