Building WordPress Themes With Bootstrap

Hello @AdiPurdila

I noticed that sometimes in your mark-up you used the following syntax:

<?php echo '

' . get_the_title() . '

'; ?>

and other times you did

<?php get_the_title() ?>

They both look the same functionally to me or am I missing something?
and if they are why choose one over the other?

Hey @RJLuppino,

They both do the same thing, the only difference being the context in which they’re used. I would use the first version when that function would have a lot of PHP code around it and the second version when I would have a lot of HTML code around it.

It’s a matter of convenience really. Does that answer your question?


P.S. Love your name professor :slight_smile:

Thank You @AdiPurdila ,

Yes it does answer my question very well. Great course I am getting a lot out of it.