Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

PHP

Error in Console...HELP, PLEASE!

When I run this code in the console...

$a = 5;
$b = 10;
var_dump ($a * $b );
var_dump ($a / $b );

...I get this error:

"PHP Parse error: syntax error, unexpected '$a' (T_VARIABLE) in /home/treehouse/workspace/numbers .php on line 16"

Any suggestions on what I did wrong? I would great appreciate if you explained your answer. Thank in advance for your help.

2 Answers

Jennifer Nordell
seal-mask
STAFF
.a{fill-rule:evenodd;}techdegree
Jennifer Nordell
Treehouse Teacher

Hi there! According to the error the $a doesn't come until line 16. Unfortunately, we can't see all your code. The most likely reason for this is that something in a line above it was not ended correctly. I would start by looking for missing semicolons as this is the most likely culprit.

Hope this helps! :sparkles:

YES!!! It was a semicolon n the line just before it. Thank you!