View Single Post
  #3   Spotlight this post!  
Unread 03-07-2005, 16:31
Mike's Avatar
Mike Mike is offline
has common ground with Matt Krass
AKA: Mike Sorrenti
FRC #0237 (Sie-H2O-Bots (See-Hoe-Bots) [T.R.I.B.E.])
Team Role: Programmer
 
Join Date: Dec 2004
Rookie Year: 2004
Location: Watertown, CT
Posts: 1,003
Mike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond repute
Re: Congratulations is spelled with a "T" and not a "D"!!

Quote:
Originally Posted by worldbringer
First of all, if you're defining a php variable, you need a dollar sign:

$ROTFLMAO = "Rolling On The Floor Laughing Out Loud";
Although that's acceptable code, it's inefficient. The quotations cause PHP to check the string for the presence of variables, where as with apostrophes PHP just outputs the text directly. That is why
Code:
$bad = '(Butt)';
$ROTFLMAO = 'Rolling On The Floor Laughing My $bad Off';
echo $ROTFLMAO;
Will show Rolling On The Floor Laughing My $bad Off

You could however, do
Code:
$bad = '(Butt)';
$ROTFLMAO = 'Rolling On The Floor Laughing My '.$bad.' Off';
Code:
echo $ROTFLMAO;
Which would show Rolling On The Floor Laughing My (Butt) Off

Where
Code:
$bad = '(Butt)';
$ROTFLMAO = "Rolling On The Floor Laughing My $bad Off";
echo $ROTFLMAO;
Will show Rolling On The Floor Laughing My (Butt) Off

My bad if I steered us horribly off topic
__________________
http://www.mikesorrenti.com/