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 trialmk37
10,271 Pointshow to write an entity code without it turning into the entity?
just out of curiousity, lets say for example i wanted to type in the entity code " &a mp; " without it turning in the actual " & " ? how would that be done. thanks
2 Answers
Marouen Helali
1,599 PointsHi,
use escape sequences. You would need to use / before special characters for them to appear as they are. For example, /& would appear as &, /" would appear as " instead of working as a string indicator.
Hope this helps!
Jonas Lee
27,296 PointsWell you could create a PHP file and use an escape sequence '/'. To do this, in the element you are specifying such as <h1> or <p> you would start with the opening php tags <?php ?> and inside type the echo function.
<?php echo "/& amp;" ?>
You don't have to use PHP but it's a very good tool that has many different functions :) Hope this helps!
John Lack-Wilson
8,181 PointsJohn Lack-Wilson
8,181 PointsHi Mohammed, not sure what you mean by you want to type in the code " & " without it turning in the actual " & " ?.