View Single Post
  #16  
Old 04-25-2011, 09:49 PM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Quote:
Originally Posted by Deas_Voice View Post
just a question, not to hijack the thread, but, i've got this weird habbit of doing temp.foo when i'm assigning something to the variable, and foo if im checking it for something.

i.e.
PHP Code:
temp.foo = {10,20};
if (
10 in foo)  {
  for (
temp.var : {"food","desert","pluffy"}) {
    
temp.foo.add( var );
  }

is this wrong too?
Once you declare a variable as temp you don't need to use the prefix again. You should, though—take it from someone who leaves it out and is trying to kick that habit after doing it for years.
__________________
Reply With Quote