nyi8083 Posted August 2, 2006 Share Posted August 2, 2006 Does it matter if I use the same variable names in different php files? Is this a bad practice or does this really not matter at all? Link to comment https://forums.phpfreaks.com/topic/16274-variable-names/ Share on other sites More sharing options...
redarrow Posted August 2, 2006 Share Posted August 2, 2006 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. Link to comment https://forums.phpfreaks.com/topic/16274-variable-names/#findComment-67490 Share on other sites More sharing options...
Colleen78 Posted August 2, 2006 Share Posted August 2, 2006 [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 More sharing options...
redarrow Posted August 2, 2006 Share Posted August 2, 2006 aytime good looking. Link to comment https://forums.phpfreaks.com/topic/16274-variable-names/#findComment-67497 Share on other sites More sharing options...
wildteen88 Posted August 2, 2006 Share Posted August 2, 2006 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$nameRedarrows 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 More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.