View Single Post
  #5  
Old 08-08-2011, 08:56 PM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
Quote:
Originally Posted by blackbeltben View Post
Can someone please explain the temp. thing. Im trying to learn. what is temp?
Probably should of created a thread to ask this question but here's an example.

PHP Code:
function onCreated() {
  
temp.1;
  
example();
  echo(
temp.a); // echos "1"
}

function 
example() {
  
temp.2;
  echo(
temp.a); // echos "2"

Basically the value stays 'local' to the function it's in, and when the function is completed the value is discarded because it is no longer needed.

Placing the temp. prefix on your variable designates it as temporary. But that's the basic gist of it.
__________________
Quote:
Reply With Quote