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 PHP Basics Unit Converter Integers

Cliff Jackson
Cliff Jackson
2,887 Points

Number is displaying in the wrong place in the console

When i run the script the number is appearing in front of the text in the console instead of on its own?

https://w.trhou.se/ea71a1kyit

2 Answers

Matti Mänty
Matti Mänty
5,885 Points

Add a line break before the number, if you want something to print on a new line. For PHP, I think it was \n .

I agree with Matti, it will look like this.

$num_one = 1;
$num_two = 2;
$num_three = 3;

echo $num_one . "\n";
?>```

That way when it displays onto the page it will create a new line for the next text.