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!
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
Is the output in my terminal displaying correctly
so I am learning about php and I have this in my text editor:
<?php $num_one = 1; $num_two = 2; $num_three = 3; echo $num_three ?>
when I run my code on my comuter I get this output
3RSG-5000_eramirez:PHP Basics erikramirez$
the 3 is right next to the other output, I was wondering if this is correct since I usually see the output right after the first line
Jennifer NordellTreehouse Teacher
So where you have:
echo $num_three; // there should be a semicolon there
echo $num_three . "\n";
Hope this helps!
The automatic addition (or lack of it) of a new line may also depend on your OS. Windows automatically inserts a new line, but I believe that to be the default behavior of the console and not PHP.
I see, I have noticed that, thanks for responding Jennifer Nordell