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 How to Build a WordPress Theme Converting Static HTML into WordPress Templates Coding the Header and Footer Templates

Luke Lee
Luke Lee
7,577 Points

Confusing about eho => false

The video says it manipulate the information before we spit to the page. what does that mean?

2 Answers

Matt Campbell
Matt Campbell
9,767 Points

I'm guessing it relates to a check of some sort?

If a equals b then true, if not then false.

If you were checking say, if a user is logged in and only logged in users can view the content, you would write something like, and this is in WordPress,

if(user_logged_in()){
    //page content code goes here. 
}else{
    //Link to registration form or a registration form itself with message about needing to be registered
}

Really could do with more information to be sure though, that this is what you're asking.

Luke Lee
Luke Lee
7,577 Points

Thank you, Matthew. The full codes are below. we use strip_tags to remove ul and li tags, so the html only show "a" tag. In order to do this, we also need to add "echo => false", that's the part I don't understand. ```<div class=“grid_12 omega”><nav> <?php $args = array( ‘menu’ => ‘main-menu’, ‘echo’ => false); echo strip_tags(wp_nav_menu($args), ‘<a>’); ?> </nav></div>