Connecting Tech Pros Worldwide Forums | Help | Site Map

T_Echo parse Error.

Newbie
 
Join Date: Aug 2009
Posts: 2
#1: Aug 17 '09
Can someone please tell me why this brings up a T_Echo parse error? I'm sure what I'm missing is basic but I need to know.

Expand|Select|Wrap|Line Numbers
  1. <?php
  2.  
  3. $weight = 153
  4. echo "The weight is {$weight}lbs.";
  5. echo 'The weight is ' . $weight . 'lbs.';
  6.  
  7.     /*What you will see:
  8.     The total weight is 153lb */
  9.  
  10. ?>

Dormilich's Avatar
Moderator
 
Join Date: Aug 2008
Location: Leipzig, Germany
Posts: 3,658
#2: Aug 17 '09

re: T_Echo parse Error.


you’re missing a semicolon on line 3.
Newbie
 
Join Date: Aug 2009
Posts: 2
#3: Aug 17 '09

re: T_Echo parse Error.


Woww. Thanks for the help.
Reply

Tags
variable