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 Build a Basic PHP Website (2018) Listing and Sorting Inventory Items Sorting Array Items

Amber Hoddinott
Amber Hoddinott
6,494 Points

can someone explain to me what the &gt is doing? she says i think that it makes the page title appear on all the pages?

the code :

<h1> <?php
if($section != null){
echo "<a href='catolog.php'>Full Catalog></a>" &gt;
}
echo $pageTitle;
}
?>
</h1>

7 Answers

Sean T. Unwin
Sean T. Unwin
28,690 Points

Many times it is used a ui design element to denote an arrow or separator, or a pointer to indicate there is relevant child or sub information relating to the word or phrase before the greater than symbol.

Being used as an arrow/ separator can be seen on some websites in the form of "breadcrumbs" to display a navigation chain:

"Home > Calender > Events" or similar.

The usage as a pointer indicator is what is being used in this project where it will look similar to the following when displayed (without any CSS styling):


Full Catalog > $pageTitle

  • $item[0]
  • $item[1]
  • $item[2]

Sean T. Unwin
Sean T. Unwin
28,690 Points

&gt; needs to be in the quotes. This an HTML representation of the greater-than symbol. Conversely, &lt; is for the less-then symbol.

Simply put that bit of text within the quotes (as shown below) and you should be good.

echo "<a href='catolog.php'>Full Catalog></a> &gt; "
Amber Hoddinott
Amber Hoddinott
6,494 Points

thank you ... ok i get that now.. bt what is it doing? what does it do to my code, a html greater than and less that sign? i dont understand what it does?

Amber Hoddinott
Amber Hoddinott
6,494 Points

So basically it displays a > in the browser?

Sean T. Unwin
Sean T. Unwin
28,690 Points

That's right. Simple as a that. :-)

Amber Hoddinott
Amber Hoddinott
6,494 Points

it normally the simple stuff i get confused with? ha ha

Sean please can you help me with my other question on php it's called ''PLEASE PLEASE!! Can someone explain this to me... i can't move forward with my learning until i understand this??!!'' i will add another comment at the end now to explain again what im asking. I would be so grateful!!

I'm confusing , Why should we put greater than sign(>) in this particular statement ?

René Sánchez
René Sánchez
9,954 Points

Your final result in your web page will look like this:

"Full Catalog > Movies "

Instead of Movies it could be Books or Music, but the greater than is just used as an arrow to indicate which section of the catalog you are currently viewing.

Also the Full Catalog text is linked to the actual full catalog, so the end result is pretty neat.

I hope this clarifies your issue, i was like WTF also until i took a look at the catalog!