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
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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.